Package jenkins.security
Class BasicHeaderApiTokenAuthenticator
- java.lang.Object
-
- jenkins.security.BasicHeaderAuthenticator
-
- jenkins.security.BasicHeaderApiTokenAuthenticator
-
- All Implemented Interfaces:
ExtensionPoint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Extension public class BasicHeaderApiTokenAuthenticator extends BasicHeaderAuthenticator
Checks if the password given in the BASIC header matches the user's API token.- Since:
- 1.576
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description BasicHeaderApiTokenAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authentication
authenticate2(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, String username, String password)
Note: if the token does not exist or does not match, we do not useSecurityListener.fireFailedToAuthenticate(String)
because it will be done in theBasicHeaderRealPasswordAuthenticator
in the case the password is not valid either-
Methods inherited from class jenkins.security.BasicHeaderAuthenticator
all, authenticate
-
-
-
-
Method Detail
-
authenticate2
public org.springframework.security.core.Authentication authenticate2(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, String username, String password) throws javax.servlet.ServletException
Note: if the token does not exist or does not match, we do not useSecurityListener.fireFailedToAuthenticate(String)
because it will be done in theBasicHeaderRealPasswordAuthenticator
in the case the password is not valid either- Overrides:
authenticate2
in classBasicHeaderAuthenticator
- Throws:
javax.servlet.ServletException
-
-