GigaSpaces XAP 9.7.2 API

com.gigaspaces.security.service
Class SecurityContext

java.lang.Object
  extended by com.gigaspaces.security.service.SecurityContext
All Implemented Interfaces:
Externalizable, Serializable

public class SecurityContext
extends Object
implements Externalizable

Security context passed between proxy and server.

Since:
7.0.1
Author:
Moran Avigdor
See Also:
Serialized Form

Constructor Summary
SecurityContext()
          Externalizable public no-args constructor
SecurityContext(CredentialsProvider credentialsProvider)
           
SecurityContext(SecurityContext securityContext)
          Security context constructed for subsequent session interaction.
SecurityContext(UserDetails userDetails, com.gigaspaces.security.AuthenticationToken authenticationToken)
          Security context constructed upon authentication.
 
Method Summary
 AuditDetails getAuditDetails()
           
 Authentication getAuthentication()
           
 com.gigaspaces.security.AuthenticationToken getAuthenticationToken()
           
 UserDetails getUserDetails()
           
 void readExternal(ObjectInput in)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityContext

public SecurityContext()
Externalizable public no-args constructor


SecurityContext

public SecurityContext(CredentialsProvider credentialsProvider)

SecurityContext

public SecurityContext(SecurityContext securityContext)
Security context constructed for subsequent session interaction.

Parameters:
securityContext - a token for this session.

SecurityContext

public SecurityContext(UserDetails userDetails,
                       com.gigaspaces.security.AuthenticationToken authenticationToken)
Security context constructed upon authentication.

Parameters:
userDetails - authenticated user details with populated authorities.
authenticationToken - a token for this session.
Method Detail

getUserDetails

public UserDetails getUserDetails()
Returns:
the userDetails (may be null); null when context is transfered after a successful authentication; non-null when accessed from within an ISpaceFilter.

getAuthentication

public Authentication getAuthentication()
Returns:
the authentication (may be null); null when context is transfered before a successful authentication; non-null when accessed from within an ISpaceFilter after successful authentication.

getAuthenticationToken

public com.gigaspaces.security.AuthenticationToken getAuthenticationToken()
Returns:
the authenticationToken (may be null); null when context is transfered before a successful authentication; non-null when accessed from within an ISpaceFilter after successful authentication.

getAuditDetails

public AuditDetails getAuditDetails()
Returns:
the auditDetails (may be null); null when context is transfered after a successful authentication; non-null when accessed from within an ISpaceFilter.

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.