basic-authentication

IIS7 and Authentication problems

北战南征 提交于 2019-11-29 10:50:48
i've got a stock standard ASP.NET web site, deployed to our development machine (internal machine in our server room). Now, this dev site can be accessed by both INTERNAL and EXTERNAL users. Now, in IIS6 we used to have it so that Anonymous Authentication was turned off and something else was turned on .. giving the users a popup model box for username and password. I think they had to type some username or password that was defined in a web.config file? (not their website account username/password)/ Now, with IIS7, when i turn Anon Auth off , and turn on Basic or Windows Auth , i get access

Basic laravel route password protection without setting up database?

戏子无情 提交于 2019-11-29 10:20:02
问题 I'm looking for a dead simple password protection solution (username and password stored as key-value pair in array) to a domain (example.com/demo). I know this is bad practice in production but this is just a quick demo to someone. The code I have currently is pretty trivial stuff: Route::group(['prefix' => 'demo', 'before' => 'auth.basic'], function() {...}); Would I have to create my own filter? How would I set it so the filter only works in production? 回答1: This is as simple as it gets:

Authentication with WKWebView in Swift

情到浓时终转凉″ 提交于 2019-11-29 09:17:24
In my iOS app, I would like to use a WKWebView to wrap an external URL in the application. This URL requires basic authentication (it needs user and password credential, like in the following screenshot). After some investigation, I'm trying to use didReceiveAuthenticationChallenge method, in order to enable an automatic login, so I'm not understanding how it works. This is my code. import UIKit import WebKit class WebViewController: UIViewController, WKNavigationDelegate { var webView: WKWebView? private var request : NSURLRequest { let baseUrl = "https://unimol.esse3.cineca.it/auth/Logon.do"

Error “HTTP/1.1 401 Unauthorized” with basic authentication in android - EWS 2010

依然范特西╮ 提交于 2019-11-29 09:07:28
I refer to this link to request to the server. The problem is sometime (not always, about 20% - 30%, means sometime I can get successful response), I got the 401 error and server response basic authorization challenge expected, but not found . Here is my code: HttpRequestInterceptor preemptiveAuth = new HttpRequestInterceptor() { public void process(final HttpRequest request, final HttpContext context) throws HttpException, IOException { AuthState authState = (AuthState) context .getAttribute(ClientContext.TARGET_AUTH_STATE); CredentialsProvider credsProvider = (CredentialsProvider) context

Using HttpProxy to connect to a host with preemtive authentication

前提是你 提交于 2019-11-29 08:53:21
I am using HttpClient to connect to a host which requires BasicAUTH. But the proxy doesn't require any authentication. I have set it up as follows: private final HttpClient httpClient; // Spring injected Setting Basic auth: private void setBasicAuth(final String username, final String password) { httpClient.getState().setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM), new UsernamePasswordCredentials(username, password)); httpClient.getParams().setAuthenticationPreemptive(true); } Setting proxy: private void setProxy(final String proxyHost, final int

HTTP basic authentication not working in python 3.4

依然范特西╮ 提交于 2019-11-29 08:11:10
问题 I am trying to login to a REST API using HTTP Basic Authentication but it is not working and giving the error HTTP error 400: Bad Request Here is my code: import urllib.parse import urllib.request import urllib.response # create an authorization handler #auth_handler = urllib.request.HTTPPasswordMgrWithDefaultRealm() auth_handler = urllib.request.HTTPBasicAuthHandler() # Add the username and password. # If we knew the realm, we could use it instead of None. userName = "username" passWord =

Spring security 3 http-basic authentication-success-handler

本小妞迷上赌 提交于 2019-11-29 07:02:16
H i'm using spring security for form-login i have <http auto-config="true"> <intercept-url pattern="/pages/**" access="ROLE_USER" /> <form-login authentication-success-handler-ref="authenticationSuccessHandler" login-page="/login.html" default-target-url="/pages/index.html" always-use-default-target="true" authentication-failure-url="/login.html" /> <logout logout-success-url="/login.html" invalidate-session="true" /> <anonymous enabled='false'/> </http> here i can set an authentication-success-handler-ref , how can i add one to my basic authentication: <http pattern="/REST/**" realm="REALM"

Node.js http basic auth

别来无恙 提交于 2019-11-29 06:47:09
问题 Is it possible to do basic auth in Node.js just like in Apache? http://doc.norang.ca/apache-basic-auth.html I know that if using Express or Connect I can add middle-ware functionality and do user verification, but I'm trying to restrict the whole area (I don't need to authenticate users from a database just a couple of defined users) - I'm using Ubuntu. https://github.com/kaero/node-http-digest That's something I can do, but I'm not sure if "exposing" or directly writing the user and password

Add HTTP basic authentication to this HTTP GET in angularjs

前提是你 提交于 2019-11-29 06:41:48
I have an existing angularjs code which makes a HTTP GET. Extracted below is some relevant code inside the controller. .controller('imptViewCtrl', ['$scope', '$http', function ($scope, $http, ) { var url = $configuration.webroot + '/impt/list?list=testlist'; $http.get(url).then(function (response) { tableData = response.data; }); }]); I would like to add HTTP basic authentication to the HTTP GET. The username is foo and the password is bar . How can this be done? Because in basic authentication, the username and password are decode by base64. You need to find a library to do this work for

Login Form For Http Basic Auth

試著忘記壹切 提交于 2019-11-29 06:21:34
I am running a Perl application named bitlfu.For login it is using something like Apache HTTP Basic Auth but not a form.I want to make form for the login with username and password field. I have tried JavaScript and PHP with no results till now. So I need help! PS: this kind of url works http://user:password@host.com Aif I think a simple JavaScript like: document.location='http://' + user + ':' + pass + '@mydomain.tld'; should do the work. So basically, you have to create a form, with a user and pass field, then onsubmit, use the part of JavaScript given here: <form method="post" onsubmit=