Package jenkins.security
Class NonSerializableSecurityContext
java.lang.Object
jenkins.security.NonSerializableSecurityContext
- All Implemented Interfaces:
 Serializable,org.springframework.security.core.context.SecurityContext
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public class NonSerializableSecurityContext
extends Object
implements org.springframework.security.core.context.SecurityContext
The same as 
SecurityContextImpl but doesn't serialize Authentication.
 
 Authentication often contains UserDetails implemented by a plugin,
 but when it's persisted as a part of HttpSession, such instance will never
 de-serialize correctly because the container isn't aware of additional classloading
 in Jenkins.
 
Jenkins doesn't work with a clustering anyway, and so it's better to just not persist Authentication at all. See the problem report.
- Since:
 - 1.509
 - Author:
 - Kohsuke Kawaguchi
 - See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionNonSerializableSecurityContext(org.springframework.security.core.Authentication authentication)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleanorg.springframework.security.core.AuthenticationinthashCode()voidsetAuthentication(org.springframework.security.core.Authentication authentication) toString() 
- 
Constructor Details
- 
NonSerializableSecurityContext
public NonSerializableSecurityContext() - 
NonSerializableSecurityContext
public NonSerializableSecurityContext(org.springframework.security.core.Authentication authentication)  
 - 
 - 
Method Details
- 
equals
 - 
getAuthentication
public org.springframework.security.core.Authentication getAuthentication()- Specified by:
 getAuthenticationin interfaceorg.springframework.security.core.context.SecurityContext
 - 
hashCode
public int hashCode() - 
setAuthentication
public void setAuthentication(org.springframework.security.core.Authentication authentication) - Specified by:
 setAuthenticationin interfaceorg.springframework.security.core.context.SecurityContext
 - 
toString
 
 -