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 - 
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate2(jakarta.servlet.http.HttpServletRequest req, jakarta.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 theBasicHeaderRealPasswordAuthenticatorin the case the password is not valid eitherMethods inherited from class jenkins.security.BasicHeaderAuthenticator
all, authenticate, authenticate2 
- 
Constructor Details
- 
BasicHeaderApiTokenAuthenticator
public BasicHeaderApiTokenAuthenticator() 
 - 
 - 
Method Details
- 
authenticate2
public org.springframework.security.core.Authentication authenticate2(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse rsp, String username, String password) throws jakarta.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 theBasicHeaderRealPasswordAuthenticatorin the case the password is not valid either- Overrides:
 authenticate2in classBasicHeaderAuthenticator- Throws:
 jakarta.servlet.ServletException
 
 -