Class UserAuthenticationContext
java.lang.Object
com.atlassian.crowd.model.authentication.AuthenticationContext
com.atlassian.crowd.model.authentication.UserAuthenticationContext
- All Implemented Interfaces:
Serializable
The
UserAuthenticationContext is used to authenticate
users.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUserAuthenticationContext(String name, PasswordCredential credential, ValidationFactor[] validationFactors, String application) -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the application name the authentication request is for.inthashCode()booleanbooleanReturns whether updates like publishing authenticated events, setting user authentication attributes etc.voidsetApplication(String application) Sets the application name the authentication request is for.voidsetLocalCrowdWebAppAuthentication(boolean localCrowdWebAppAuthentication) voidsetPostAuthenticationUpdatesRequired(boolean postAuthenticationUpdatesRequired) Sets whether updates like publishing authenticated events, setting user authentication attributes etc.toString()Methods inherited from class com.atlassian.crowd.model.authentication.AuthenticationContext
getCredential, getName, getValidationFactors, setCredential, setName, setValidationFactors
-
Constructor Details
-
UserAuthenticationContext
public UserAuthenticationContext() -
UserAuthenticationContext
public UserAuthenticationContext(String name, @Nullable PasswordCredential credential, ValidationFactor[] validationFactors, String application)
-
-
Method Details
-
getApplication
Gets the application name the authentication request is for.- Returns:
- The application name.
-
setApplication
Sets the application name the authentication request is for.- Parameters:
application- The application name.
-
isLocalCrowdWebAppAuthentication
public boolean isLocalCrowdWebAppAuthentication()- Returns:
- true, if it's Crowd itself authenticating a user in `crowd` app. False, if it's an external client (i.e. REST API client).
-
setLocalCrowdWebAppAuthentication
public void setLocalCrowdWebAppAuthentication(boolean localCrowdWebAppAuthentication) -
isPostAuthenticationUpdatesRequired
public boolean isPostAuthenticationUpdatesRequired()Returns whether updates like publishing authenticated events, setting user authentication attributes etc. are required after a successful authentication.- Returns:
- true if updates are required, false otherwise
- Since:
- 6.2.0
-
setPostAuthenticationUpdatesRequired
public void setPostAuthenticationUpdatesRequired(boolean postAuthenticationUpdatesRequired) Sets whether updates like publishing authenticated events, setting user authentication attributes etc. are required after a successful authentication. For two-step verification, this should be set to false while doing credential verification.- Parameters:
postAuthenticationUpdatesRequired- true if updates are required, false otherwise- Since:
- 6.2.0
-
equals
- Overrides:
equalsin classAuthenticationContext
-
hashCode
public int hashCode()- Overrides:
hashCodein classAuthenticationContext
-
toString
- Overrides:
toStringin classAuthenticationContext
-
withName
- Returns:
- a new
UserAuthenticationContextthat is a copy of this one with the username replaced with the provided value
-