Package hudson.security
Class ContainerAuthentication
java.lang.Object
hudson.security.ContainerAuthentication
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class ContainerAuthentication
extends Object
implements org.springframework.security.core.Authentication
Authentication implementation for Principal
given through HttpServletRequest.
This is used to plug the container authentication to Spring Security, for backward compatibility with Hudson < 1.160.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionContainerAuthentication(jakarta.servlet.http.HttpServletRequest request) Servlet container can tie aServletRequestto the request handling thread, so we need to capture all the information upfront to allowAuthenticationto be passed to other threads, like update center does. -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority>getName()booleanvoidsetAuthenticated(boolean isAuthenticated)
-
Constructor Details
-
ContainerAuthentication
public ContainerAuthentication(jakarta.servlet.http.HttpServletRequest request) Servlet container can tie aServletRequestto the request handling thread, so we need to capture all the information upfront to allowAuthenticationto be passed to other threads, like update center does. See JENKINS-5382.
-
-
Method Details
-
getAuthorities
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getDetails
- Specified by:
getDetailsin interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
- Specified by:
setAuthenticatedin interfaceorg.springframework.security.core.Authentication- Throws:
IllegalArgumentException
-
getName
-