@Extension public class BasicHeaderApiTokenAuthenticator extends BasicHeaderAuthenticator
ExtensionPoint.LegacyInstancesAreScopedToHudson| Constructor and Description |
|---|
BasicHeaderApiTokenAuthenticator() |
| Modifier and Type | Method and Description |
|---|---|
org.acegisecurity.Authentication |
authenticate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp,
String username,
String password)
Given the parsed username and password field from the basic authentication header,
determine the effective security credential to process the request with.
|
allpublic org.acegisecurity.Authentication authenticate(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse rsp,
String username,
String password)
throws javax.servlet.ServletException
BasicHeaderAuthenticatorThe method must return null if the password or username didn't match what's expected. When null is returned, other authenticators will get a chance to process the request. This is necessary because Jenkins accepts both real password as well as API tokens for the password.
In contrast, when an exception is thrown the request processing will fail immediately without providing a chance for other authenticators to process the request.
When no processor can validate the username/password pair, caller will make the request processing fail.
authenticate in class BasicHeaderAuthenticatorjavax.servlet.ServletExceptionCopyright © 2019. All rights reserved.