com.sun.enterprise.security.integration
Interface AppServSecurityContext


@Contract
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public interface AppServSecurityContext

The SecurityContext Interface, also provide factory methods


Method Summary
 Principal getCallerPrincipal()
          This method should be implemented by the subclasses to return the caller principal.
 AppServSecurityContext getCurrentSecurityContext()
           
 Subject getSubject()
          This method should be implemented by the subclasses to return the Credentials of the caller principal.
 AppServSecurityContext newInstance(String userName, Subject subject)
           
 AppServSecurityContext newInstance(String userName, Subject subject, String realm)
           
 void setCurrentSecurityContext(AppServSecurityContext context)
          set the current security context
 void setSecurityContextWithPrincipal(Principal principal)
          set the SecurityContext with given Principal
 void setUnauthenticatedSecurityContext()
          set the unauthenticated context
 

Method Detail

getCallerPrincipal

Principal getCallerPrincipal()
This method should be implemented by the subclasses to return the caller principal. This information may be redundant since the same information can be inferred by inspecting the Credentials of the caller.

Returns:
The caller Principal.

getSubject

Subject getSubject()
This method should be implemented by the subclasses to return the Credentials of the caller principal.

Returns:
A credentials object associated with the current client invocation.

newInstance

AppServSecurityContext newInstance(String userName,
                                   Subject subject,
                                   String realm)
Returns:
a new instance

newInstance

AppServSecurityContext newInstance(String userName,
                                   Subject subject)
Returns:
a new instance

setCurrentSecurityContext

void setCurrentSecurityContext(AppServSecurityContext context)
set the current security context


getCurrentSecurityContext

AppServSecurityContext getCurrentSecurityContext()
Returns:
the current security context

setUnauthenticatedSecurityContext

void setUnauthenticatedSecurityContext()
set the unauthenticated context


setSecurityContextWithPrincipal

void setSecurityContextWithPrincipal(Principal principal)
set the SecurityContext with given Principal



Copyright © 2012 GlassFish Community. All Rights Reserved.