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
ConstructorDescriptionUserAuthenticationContext
(String name, PasswordCredential credential, ValidationFactor[] validationFactors, String application) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the application name the authentication request is for.int
hashCode()
boolean
void
setApplication
(String application) Sets the application name the authentication request is for.void
setLocalCrowdWebAppAuthentication
(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:
equals
in classAuthenticationContext
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAuthenticationContext
-
toString
- Overrides:
toString
in classAuthenticationContext
-
withName
- Returns:
- a new
UserAuthenticationContext
that is a copy of this one with the username replaced with the provided value
-