http-authentication

Connecting to socket with authentication in python

强颜欢笑 提交于 2020-01-14 03:10:16
问题 I'm trying to connect to a mongodb instance through a python socket. The url looks like this username:password@host.com:port how can I connect to this with a python socket? The following code gives me this error: [Errno -5] No address associated with hostname import socket import tornado full_url = '%s:%s@%s' % (username, password, host) s = socket.socket() s.connect((full_url, port)) stream = iostream.IOStream(s) EDIT - the reason I ask is because asyncmongo doesn't support this type of url

WCF with Http Basic Authentication

爱⌒轻易说出口 提交于 2020-01-05 17:43:12
问题 I'm building a webservice that needs to be accessible to a variety of potential platforms, including a number of older ASP and ASP .NET applications. After some research, I settled on a WCF service with both a REST (webHttpBinding) and SOAP (wsHttpBinding) endpoint (that way, I can support a wide range of platforms and still make the .NET coders happy). For security, I'm using SSL and HTTP Authentication Basic against my own database of username/passwords. So I've written an HttpModule to

WCF with Http Basic Authentication

蹲街弑〆低调 提交于 2020-01-05 17:42:27
问题 I'm building a webservice that needs to be accessible to a variety of potential platforms, including a number of older ASP and ASP .NET applications. After some research, I settled on a WCF service with both a REST (webHttpBinding) and SOAP (wsHttpBinding) endpoint (that way, I can support a wide range of platforms and still make the .NET coders happy). For security, I'm using SSL and HTTP Authentication Basic against my own database of username/passwords. So I've written an HttpModule to

How can I use http auth information from a URL in Android?

帅比萌擦擦* 提交于 2020-01-05 03:36:12
问题 In my browser, or in iOS, when I try to get the contents of a URL with encoded http authentication information in the form http://myUser:myPassword@www.example.com/secure/area/index.html It just works. I'm getting URLs from a web service, and I'd like to avoid trying to parse them up for their HTTP auth info if I can help it. Is there a way to do something similar in Android without actually parsing the URLs? Alternatively, what is the best way to go about that? UPDATE: I find that when I try

Authenticating Gitweb with Gitosis without LDAP Auth?

大兔子大兔子 提交于 2020-01-03 12:31:55
问题 I found your article using Apache Auth with gitweb, gitosis. I was wondering if there was a way to do this if I wasn't using LDAP for authentication. We currently have a very large NIS domain which we use for authentication on all unix servers. We use this for SVN repositories through a UI, but for this case I am trying to meet a requirement of: Git Repositories Access Controlled - using Gitolite Online UI - using Gitweb UI must also have Access Control - not yet implemented I was thinking

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 + selenium webdriver : using authenticate method

帅比萌擦擦* 提交于 2020-01-01 06:35:13
问题 I am using python + selenium webdriver to automatize checks. I am stuck on websites that request http authentication through popup window. I am trying to use the "authenticate" method through the following code : #init. driver = webdriver.Firefox() driver.get(url) #get to the auth popup window by clicking relevant link elem = driver.find_element_by_id("login_link") elem.click() #use authenticate alert method driver._switch_to.alert.authenticate("login", "password") the (scarce) infos/doc

HTTP Authentication - WWW-Authenticate header - multiple realms

孤者浪人 提交于 2019-12-30 08:01:58
问题 Does anyone have any experience of supporting multiple realms in HTTP Authentication? The Microsoft website states: Each authenticate response header contains an available authentication scheme and a realm. If multiple authentication schemes are supported, the server returns multiple authenticate response headers. The realm value is case-sensitive and defines a protection space on the proxy or server. For example, the header "WWW-Authenticate: Basic Realm="example"" would be an example of a

HTTP Authentication (Basic or Digest) in ASP Classic via IIS [closed]

江枫思渺然 提交于 2019-12-29 04:54:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I want to develop a website in ASP classic that uses HTTP Authentication against a database or password list that is under the control of the script. Ideally, the solution should involve no components or IIS settings as the script should be runnable in a hosted environment. Any clues/code deeply appreciated. 回答1

Basic HTTP Authentication on iPhone

痞子三分冷 提交于 2019-12-28 03:23:08
问题 I'm trying to get a small twitter client running and I ran into a problem when testing API calls that require authentication. My password has special characters in it, so when I try to use the following code it doesn't work. NSString *post = [NSString stringWithFormat:@"status=%@", [status stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSData *postData = [post dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat