basic-authentication

Why are $_SERVER[“PHP_AUTH_USER”] and $_SERVER[“PHP_AUTH_PW”] not set?

好久不见. 提交于 2019-12-30 18:33:23
问题 Before I begin, I'd like to point out that I've browsed Stack Overflow and found other similar questions - PHP_AUTH_USER not set? and HTTP Auth via PHP - PHP_AUTH_USER not set? - and these have pointed out that the authentication $_SERVER variables won't be set if ''Server API'' is set to ''CGI/FCGI'', but I checked my ''phpinfo()'' output and my ''Server API'' is set to ''Apache 2.0 Handler''. Ok so I have a simple script as follows: <?php echo "Username: " . $_SERVER["PHP_AUTH_USER"] . ",

How to implement basic HTTP authentication with the VS debug server?

此生再无相见时 提交于 2019-12-30 10:36:21
问题 I'm making a test rig for an ActiveX HTTP control, and I need to create a web site to securely POST to. To keep things simple, I'm running the web app with the VS debug server; the web app project is part of the solution with the test application. NTLM authentication is not supported by the AX control. Is there any easy way to require very basic http authentication without NTLM or redirecting to a page form? I just need it to require a username and password during the post. Username and

How to implement basic HTTP authentication with the VS debug server?

痞子三分冷 提交于 2019-12-30 10:36:13
问题 I'm making a test rig for an ActiveX HTTP control, and I need to create a web site to securely POST to. To keep things simple, I'm running the web app with the VS debug server; the web app project is part of the solution with the test application. NTLM authentication is not supported by the AX control. Is there any easy way to require very basic http authentication without NTLM or redirecting to a page form? I just need it to require a username and password during the post. Username and

Passing basic auth credentials with every request with HtmlUnit WebClient

杀马特。学长 韩版系。学妹 提交于 2019-12-30 03:18:08
问题 I'm trying to write a simple smoke test for a web application. The application normally uses form based authentication, but accepts basic auth as well, but since the default is form based authentication, it never sends an authentication required, but instead just sends the login form. In the test I try to send the basic auth header using WebClient webClient = new WebClient(); DefaultCredentialsProvider creds = new DefaultCredentialsProvider(); // Set some example credentials creds

Apache authentication: Redirect on failure, reliably?

断了今生、忘了曾经 提交于 2019-12-30 02:16:05
问题 I've set my ErrorDocument 401 to point to my website's account creation page, but not all browsers seem to honor this redirect (Safari). Also, other browsers (Firefox, Chrome) never quit asking for the password and show the ErrorDocument. This causes a good number of users to give up trying after many password attempts without seeing the account creation page. Is there any way to make the redirect more reliable, without trashing basic authentication altogether? 回答1: The simple answer to your

How can I implement Basic Authentication with JWT authentication in Spring Boot?

杀马特。学长 韩版系。学妹 提交于 2019-12-30 02:09:48
问题 I have built a Spring-Boot application that works with jwt authentication. <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.diplie</groupId> <artifactId>rest-api</artifactId> <version>1.0.0</version> <packaging>war</packaging> <parent> <groupId>org

What is the difference between Digest and Basic Authentication?

元气小坏坏 提交于 2019-12-29 10:05:59
问题 What is the difference between Digest and Basic Authentication ? 回答1: Digest Authentication communicates credentials in an encrypted form by applying a hash function to: the username, the password, a server supplied nonce value, the HTTP method and the requested URI. Whereas Basic Authentication uses non-encrypted base64 encoding. Therefore, Basic Authentication should generally only be used where transport layer security is provided such as https. See RFC-2617 for all the gory details. 回答2:

Using HttpProxy to connect to a host with preemtive authentication

ε祈祈猫儿з 提交于 2019-12-29 07:18:07
问题 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()

How to force Jetty to ask for credentials with BASIC authentication after invalidating the session?

非 Y 不嫁゛ 提交于 2019-12-28 04:16:25
问题 I'm using jetty 6.1.22 with BASIC authentication as my login mechanism. The first time I log into the web app, the browser requests the username and password. If it try to log out using a session.invalidate(), the session is invalidated but the credentials are cached. This means that if I try to connect to a secured URL, I will see a different session id but no dialog for username and password. 回答1: (I realise this question is old, but it's something that other people might want an answer to)

How do I create a user account for basic authentication?

佐手、 提交于 2019-12-28 02:33:29
问题 I'd like to add basic authentication to my website. I followed the instructions in the MSDN article on Configure Basic Authentication (IIS 7) To use the UI Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7). In Features View , double-click Authentication . On the Authentication page, select Basic Authentication . In