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()booleanvoidsetApplication(String application) Sets the application name the authentication request is for.voidsetLocalCrowdWebAppAuthentication(boolean localCrowdWebAppAuthentication) 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) -
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
-