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 forPrincipal
given throughHttpServletRequest
.This is used to plug the container authentication to Spring Security, for backward compatibility with Hudson < 1.160.
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContainerAuthentication(javax.servlet.http.HttpServletRequest request)
Servlet container can tie aServletRequest
to the request handling thread, so we need to capture all the information upfront to allowAuthentication
to be passed to other threads, like update center does.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends org.springframework.security.core.GrantedAuthority>
getAuthorities()
Object
getCredentials()
Object
getDetails()
String
getName()
String
getPrincipal()
boolean
isAuthenticated()
void
setAuthenticated(boolean isAuthenticated)
-
-
-
Constructor Detail
-
ContainerAuthentication
public ContainerAuthentication(javax.servlet.http.HttpServletRequest request)
Servlet container can tie aServletRequest
to the request handling thread, so we need to capture all the information upfront to allowAuthentication
to be passed to other threads, like update center does. See JENKINS-5382.
-
-
Method Detail
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
-
getCredentials
public Object getCredentials()
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getDetails
public Object getDetails()
- Specified by:
getDetails
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
public String getPrincipal()
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()
- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException
- Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
- Throws:
IllegalArgumentException
-
-