basic-authentication

.NET POST to PHP Page

泄露秘密 提交于 2020-01-03 04:47:26
问题 I am trying to implement a very basic system from my C# .NET application that sends the IP address of the machine to authenticate.php on my web server. The php page will check this IP address against a database and either respond back with "yes" or "no". It has been a long time since I worked with PHP, and I am a little bit confused. Here is what my .NET function looks like. public static bool IsAuthenticated() { string sData = getPublicIP(); Uri uri = new Uri("http://www.mysite.com

How to add soap basic auth request to WSDL

只愿长相守 提交于 2020-01-02 13:22:30
问题 How can I had soap AUTH BASIC auth to a WSDL, so who ever reads the WSDL knows I require that operation for a specific method ? 回答1: Using the example bellow I have managed to pass the SOAP basic autentication to the php webservice on the other end. The PHP.net/Soapclient has a simple working example, but in csharp I found this link to be a solution to my problem. link Michaelis.MockService is the Webservice library extracted you may see an example on how to do this in: link Mono project

How to add soap basic auth request to WSDL

时光毁灭记忆、已成空白 提交于 2020-01-02 13:20:10
问题 How can I had soap AUTH BASIC auth to a WSDL, so who ever reads the WSDL knows I require that operation for a specific method ? 回答1: Using the example bellow I have managed to pass the SOAP basic autentication to the php webservice on the other end. The PHP.net/Soapclient has a simple working example, but in csharp I found this link to be a solution to my problem. link Michaelis.MockService is the Webservice library extracted you may see an example on how to do this in: link Mono project

Basic HTTP Authentication on Android Phones to Rails Server

旧城冷巷雨未停 提交于 2020-01-02 03:17:20
问题 I'm trying to connect to a Rails Application Server that requires authentication. I am using the Jakarta HTTP Client for Java on a Desktop application and it works 100%. But when the exact same code is executed on the Android Emulator I get an IOException. Here is the code, and if anyone could help me figure out why it throws the IOException that would be greatly appreciated! private boolean login() { String username, password; DefaultHttpClient client; AuthScope scope; Credentials

Python SOAP client, WSDL call with suds gives Transport Error 401 Unauthorized for HTTP basic authentication

痴心易碎 提交于 2020-01-02 01:25:09
问题 Background I'm building a SOAP client with python 2.7.3 and using the suds 0.4.1 library provided by Canonical. The server is using basic authentication over HTTPS. Problem Can't pass authentication on the server, even to get at the WSDL. I get the following error: suds.transport.TransportError: HTTP Error 401: Unauthorized Attempts at resolution and code I have tried both of the authentication methods described in the suds documentation, but still get the error above at the client = Client

Not getting 401 UnAuthorised with Cordova jquery ajax call , Upto Phonegap 1.4 it was working fine

若如初见. 提交于 2020-01-01 14:45:07
问题 I have upgraded my project to Phonegap 1.4 to Cordova 1.8.1. Ajax call to webservice was working fine with 401 Unauthorized , when I am passing invalid username / password in Phonegap 1.4. After up gradation it is not working , I am not getting any response and web service stay there. If change code to Phonegap 1.4 , it starts working. Please help 回答1: I've had this problem for the last couple months and finally figured it out. First of all, the temporary workaround that we used was to

ServiceStack Authentication with Existing Database

梦想的初衷 提交于 2020-01-01 10:59:28
问题 I've been looking at ServiceStack and I'm trying to understand how to use BasicAuthentication on a service with an existing database. I would like to generate a public key (username) and secret key (password) and put that in an existing user record. The user would then pass that to the ServiceStack endpoint along with their request. What do I need to implement in the ServiceStack stack to get this working? I have looked at both IUserAuthRepository and CredentialsAuthProvider base class and it

WindowsIdentity.Impersonate in ASP.NET randomly “Invalid token for impersonation - it cannot be duplicated”

女生的网名这么多〃 提交于 2020-01-01 09:24:01
问题 I have an ASP.NET app that requires users to sign in with their domain accounts using Basic Authentication. The user can make a selection, then press a button. At some point after pressing the button is this code: WindowsIdentity.Impersonate(userIdentity.Token) . userIdentity is of type WindowsIdentity , and it was previously set to (WindowsIdentity)User.Identity . userIdentity is stored as a session variable, and I think that's because, after the button is pressed, the page containing this

WindowsIdentity.Impersonate in ASP.NET randomly “Invalid token for impersonation - it cannot be duplicated”

瘦欲@ 提交于 2020-01-01 09:22:08
问题 I have an ASP.NET app that requires users to sign in with their domain accounts using Basic Authentication. The user can make a selection, then press a button. At some point after pressing the button is this code: WindowsIdentity.Impersonate(userIdentity.Token) . userIdentity is of type WindowsIdentity , and it was previously set to (WindowsIdentity)User.Identity . userIdentity is stored as a session variable, and I think that's because, after the button is pressed, the page containing this

How do I make an HTTP Post with HTTP Basic Authentication, using POCO?

与世无争的帅哥 提交于 2020-01-01 03:49:11
问题 I'm trying to make an HTTP Post with HTTP Basic Authentication (cleartext username and password), using POCO. I found an example of a Get and have tried to modify it, but being a rookie I think I've mangled it beyond usefulness. Anyone know how to do this? Yes, I've already seen the other SO question on this: POCO C++ - NET SSL - how to POST HTTPS request, but I can't make sense of how it is trying to implement the username and password part. I also don't understand the use of "x-www-form