basic-authentication

Selenium Webdriver and Basic Auth in IE

不想你离开。 提交于 2019-12-11 03:10:01
问题 Is there any way to provide username and password to a basic auth dialog in IE using Selenium Webdriver? Passing the credentials in the URL is not an option for us. 回答1: I got a solution for this epic problem Use awt!! Open the URL and use the java Robot class or the SmartRobot class given below: class SmartRobot extends Robot { public SmartRobot() throws AWTException { super(); } /*public void pressEnter() { keyPress(KeyEvent.VK_ENTER); delay(50); keyRelease(KeyEvent.VK_ENTER); } */ public

HTTP Basic for API - How to “reduce” credential encryption?

守給你的承諾、 提交于 2019-12-11 02:23:05
问题 I currently wrote an API which uses HTTP Basic over TLS for authentication and I am quite happ y with it. Now I bumped up the values for password encryption (like length, iterations, ...) to have a more realistic scenario. Unfortunately this made API access really slow as I have to rehash the HTTP Basic credentials over and over again. What would the easiest approach be (beside of sessions of course) to overcome this problem? 回答1: pbkdf2 isn't meant to be called repeatedly, in fact, it's slow

Basic Authentication using Restkit

Deadly 提交于 2019-12-11 01:50:16
问题 I am trying to do Basic Authentication using RestKit but I need some help with figuring out why I get status code 401(Unauthorized). I tried this, but it did not work for me. I will appreciate if someone can point out my mistake. This is what my data looks like on the server side: Sample { "Id": "baec6f47", "TokenValidity": "00:00:00.1234567", "ValidTo": "2013-10-28T23:54:21.2934278+00:00", "Parameters": {}, "Token": "sample string 3" } I have a NSObject class called TokenObject, and that

Slim Basic Authentication

怎甘沉沦 提交于 2019-12-11 00:46:26
问题 Good day everyone! I have a working slim code here with slim-basic-auth and when I go to a restricted directory, this shows up: Everything works, but what I wanted to do is to redirect it to my login page instead of showing a popup login box. Here is my login page: My slim code: $pdo = new \PDO("mysql:host=localhost;dbname=databasename", "username"); $app->add(new \Slim\Middleware\HttpBasicAuthentication([ "path" => "/main", "realm" => "Protected", "authenticator" => new PdoAuthenticator([

Problem with downloading file from server that uses basic http authentication from my java code

。_饼干妹妹 提交于 2019-12-10 23:34:59
问题 I have written the following java code to download a file from a server that uses http basic authentication. But im getting Http 401 error. I can however download the file by hitting the url directly from the browser. OutputStream out = null; InputStream in = null; URLConnection conn = null; try { // Get the URL URL url = new URL("http://username:password@somehost/protected-area/somefile.doc"); // Open an output stream for the destination file locally out = new BufferedOutputStream(new

HTTP Basic Auth with Golang

左心房为你撑大大i 提交于 2019-12-10 23:33:57
问题 How do I implement basic auth with a Golang site? So that when someone visits a page they will be prompted by their browser with a login. 回答1: In order to force a user to authenticate/make that basic auth prompt in the users browser appear you send the header WWW-Authenticate : Basic ream="mydomain" So if you have a http.ResponseWriter called w , you can do w.Header().Set("WWW-Authenticate", `Basic realm="mydomain"`) Which will cause the browser to open the prompt you're referring to. 回答2:

How do I get basic security to apply when programmatically creating WebChannel in WCF?

我的梦境 提交于 2019-12-10 22:15:42
问题 I am creating a WCF channel for a POX web client in code using the WebChannelFactory . I have created a binding configuration in my app.config with basic authentication set, but when I try to connect to the service endpoint, basic security is not being applied and I get a 401 from the server. The name in my app.config endpoint configuration and my programmatic declaration match. I can confirm this b/c it's picking up the address correctly. The service endpoint challenges for BASIC security,

Chrome plugin development: user:pass@url not supported by Google Chrome anymore?

孤街浪徒 提交于 2019-12-10 22:07:25
问题 I develop a Chrome plugin that uses XMLHttpRequest to send a GET HTTP request with an username/password to a basic-auth-protected URL, so that it can then "auto-login" to it afterwards (since Chrome caches credentials for HTTP basic-auth). Here's the code I use: var xml = new XMLHttpRequest(); xml.open('GET',<url>,false,<username>,<password>) xml.send(''); It used to work fine for quite a while, but started failing some time ago. The plugin code hasn't changed, so I thought it could have to

How to redirect a user to a different server and include HTTP basic authentication credentials?

会有一股神秘感。 提交于 2019-12-10 21:36:35
问题 I have a web application (C# - ASP.net) that needs to pass a user to a page on a remote Apache server using HTTP Basic Authentication. I need to be able to pass a user name and password to this server to allow users authenticated by my application to seamlessly use the other application without being prompted to enter credentials he doesn't have. The hand-off should be secure since both systems require SSL as long as the user name and password are not in client-side script. Is there a way to

Websphere 7 simple realm (like tomcat-users.xml)

霸气de小男生 提交于 2019-12-10 21:13:41
问题 I am trying to port a J2EE app from Tomcat to Websphere and I'm not too familiar with Websphere. The only problem I am having is authorization (I use basic-authentication in my web.xml). In Tomcat I use the tomcat-users.xml file to define my users/passwords and to what roles they belong. How do I do this "simply" in Websphere? When deploying the EAR to Websphere it also asks me to map my role from web.xml to a user or group. Do I have to set up some sort of realm? Custom user registry? Thanks