Interface AuthenticationMechanismContext
-
public interface AuthenticationMechanismContextThis interface represents an authentication context.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectget(Scope scope, java.lang.String namespace, java.lang.String name)Get the value of context attribute with the specified scope, namespace, and name.CredentialgetCredential()Get the user credential.RequestgetRequest()Get the request of the current user interaction.ResponsegetResponse()Get the response of the current user interaction.java.lang.Objectremove(Scope scope, java.lang.String namespace, java.lang.String name)Remove the value of context attribute with the specified scope, namespace, and name.voidset(Scope scope, java.lang.String namespace, java.lang.String name, java.lang.Object value)Set the value of context attribute with the specified scope, namespace, and name with the specified value.voidsetCredential(Credential credential)Set the user credential.
-
-
-
Method Detail
-
get
java.lang.Object get(Scope scope, java.lang.String namespace, java.lang.String name)
Get the value of context attribute with the specified scope, namespace, and name.- Parameters:
scope- The scope.namespace- The namespace.name- The name.- Returns:
- The value.
-
set
void set(Scope scope, java.lang.String namespace, java.lang.String name, java.lang.Object value)
Set the value of context attribute with the specified scope, namespace, and name with the specified value. If the scope is SESSION, the value must be a sub-type ofSerializable.- Parameters:
scope- The scope.namespace- The namespace.name- The name.value- The value.
-
remove
java.lang.Object remove(Scope scope, java.lang.String namespace, java.lang.String name)
Remove the value of context attribute with the specified scope, namespace, and name.- Parameters:
scope- The scope.namespace- The namespace.name- The name.- Returns:
- The removed value.
-
getRequest
Request getRequest()
Get the request of the current user interaction.
-
getResponse
Response getResponse()
Get the response of the current user interaction.
-
getCredential
Credential getCredential()
Get the user credential. If the user is not authenticated, this method returns NULL. If the returned user credential is modified, call the methodsetCredential(Credential)to persist the modifications.- Returns:
- User credential.
-
setCredential
void setCredential(Credential credential)
Set the user credential. If the specified credential is NULL, authentication service sets the user as not authenticated.- Parameters:
credential- The user credential.
-
-