Interface AuthenticationMechanismContext
public interface AuthenticationMechanismContext
This interface represents an authentication context.
-
Method Summary
Modifier and TypeMethodDescriptionGet the value of context attribute with the specified scope, namespace, and name.Get the user credential.Get the request of the current user interaction.Get the response of the current user interaction.Remove the value of context attribute with the specified scope, namespace, and name.void
Set the value of context attribute with the specified scope, namespace, and name with the specified value.void
setCredential
(Credential credential) Set the user credential.
-
Method Details
-
get
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
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
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
Set the user credential. If the specified credential is NULL, authentication service sets the user as not authenticated.- Parameters:
credential
- The user credential.
-