Class AuthenticationParameters
java.lang.Object
jakarta.security.enterprise.authentication.mechanism.http.AuthenticationParameters
Parameters that are provided along with an authentication request.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncredential
(Credential credential) Sets the credential to be used by the authentication mechanism responding to the authenticate call in which these AuthenticationParameters are passed.The credential set as parameter in this instance.boolean
Whether a new authentication dialog is required.boolean
Whether "remember me" should be used.newAuthentication
(boolean newAuthentication) Signal to the authentication mechanism responding to the authenticate call in which these AuthenticationParameters are passed, that an explicit new authentication dialog is required, as opposed to continuing a potentially existing one.rememberMe
(boolean rememberMe) Signals that for this call to the authentication mechanism "remember me" should be applied, IFF the "remember me" feature is configured for the authentication mechanism responding to the authenticate call.void
setCredential
(Credential credential) Sets the credential as parameter in this instance.void
setNewAuthentication
(boolean newAuthentication) Sets whether a new authentication dialog is required.void
setRememberMe
(boolean rememberMe) Sets whether "remember me" should be used.static AuthenticationParameters
Creates a new instance of AuthenticationParameters, useful for a fluent/builder style creation of parameters.
-
Constructor Details
-
AuthenticationParameters
public AuthenticationParameters()
-
-
Method Details
-
withParams
Creates a new instance of AuthenticationParameters, useful for a fluent/builder style creation of parameters.- Returns:
- a new AuthenticationParameters instance.
-
credential
Sets the credential to be used by the authentication mechanism responding to the authenticate call in which these AuthenticationParameters are passed.- Parameters:
credential
- the credential to be used by the authentication mechanism- Returns:
- the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder style creation of parameters.
-
newAuthentication
Signal to the authentication mechanism responding to the authenticate call in which these AuthenticationParameters are passed, that an explicit new authentication dialog is required, as opposed to continuing a potentially existing one.- Parameters:
newAuthentication
- whether a new authentication dialog is required to be started.- Returns:
- the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder style creation of parameters.
-
rememberMe
Signals that for this call to the authentication mechanism "remember me" should be applied, IFF the "remember me" feature is configured for the authentication mechanism responding to the authenticate call.If "remember me" is not configured, this parameter is silently ignored.
- Parameters:
rememberMe
- iftrue
the "remember me" feature will be used if authentication succeeds and if so configured.- Returns:
- the instance of AuthenticationParameters on which this call was made, useful for a fluent/builder style creation of parameters.
- See Also:
-
getCredential
The credential set as parameter in this instance.- Returns:
- the credential set as parameter in this instance
- See Also:
-
setCredential
Sets the credential as parameter in this instance.- Parameters:
credential
- the credential to be set as parameter in this instance.- See Also:
-
isNewAuthentication
public boolean isNewAuthentication()Whether a new authentication dialog is required.- Returns:
- whether a new authentication dialog is required.
- See Also:
-
setNewAuthentication
public void setNewAuthentication(boolean newAuthentication) Sets whether a new authentication dialog is required.- Parameters:
newAuthentication
- whether a new authentication dialog is required- See Also:
-
isRememberMe
public boolean isRememberMe()Whether "remember me" should be used.- Returns:
- whether "remember me" should be used.
- See Also:
-
setRememberMe
public void setRememberMe(boolean rememberMe) Sets whether "remember me" should be used.- Parameters:
rememberMe
- whether "remember me" should be used.- See Also:
-