Interface AppServSecurityContext
@Contract
@PerLookup
public interface AppServSecurityContext
The SecurityContext Interface, also provide factory methods
-
Method Summary
Modifier and TypeMethodDescriptionThis method should be implemented by the subclasses to return the caller principal.This method should be implemented by the subclasses to return the Credentials of the caller principal.newInstance(String userName, Subject subject) newInstance(String userName, Subject subject, String realm) voidset the current security contextvoidsetSecurityContextWithPrincipal(Principal principal) set the SecurityContext with given Principalvoidset the unauthenticated context
-
Method Details
-
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
- Returns:
- a new instance
-
newInstance
- Returns:
- a new instance
-
setCurrentSecurityContext
set the current security context -
getCurrentSecurityContext
AppServSecurityContext getCurrentSecurityContext()- Returns:
- the current security context
-
setUnauthenticatedSecurityContext
void setUnauthenticatedSecurityContext()set the unauthenticated context -
setSecurityContextWithPrincipal
set the SecurityContext with given Principal
-