Package jenkins.security
Class BasicHeaderRealPasswordAuthenticator
java.lang.Object
jenkins.security.BasicHeaderAuthenticator
jenkins.security.BasicHeaderRealPasswordAuthenticator
- All Implemented Interfaces:
ExtensionPoint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
@Extension
public class BasicHeaderRealPasswordAuthenticator
extends BasicHeaderAuthenticator
Checks if the password given in the BASIC header matches the user's actual password,
as opposed to other pseudo-passwords like API tokens.
- Since:
- 1.576
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
Legacy property to disable the real password support. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
authenticate2
(jakarta.servlet.http.HttpServletRequest req, jakarta.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.Methods inherited from class jenkins.security.BasicHeaderAuthenticator
all, authenticate, authenticate2
-
Field Details
-
DISABLE
public static boolean DISABLELegacy property to disable the real password support. Now that this is an extension,ExtensionFilter
is a better way to control this.
-
-
Constructor Details
-
BasicHeaderRealPasswordAuthenticator
public BasicHeaderRealPasswordAuthenticator()
-
-
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 IOException, jakarta.servlet.ServletException Description copied from class:BasicHeaderAuthenticator
Given the parsed username and password field from the basic authentication header, determine the effective security credential to process the request with.The 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.
- Overrides:
authenticate2
in classBasicHeaderAuthenticator
- Throws:
IOException
jakarta.servlet.ServletException
-