Package com.atlassian.crowd.integration
Class AuthenticationState
java.lang.Object
com.atlassian.crowd.integration.AuthenticationState
This class holds authentication state.
In addition to knowing whether a user is authenticated or not, this class
can optionally also contain the authenticated principal to save the caller
the trouble of finding the principal in another way. In other words, the
absence of a principal does not mean that the principal does not exist.
- Since:
- 2.8.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationStatestatic AuthenticationStateauthenticated(Principal principal) Create successful authentication state containing a user.booleancom.google.common.base.Optional<Principal>inthashCode()booleanstatic AuthenticationState
-
Method Details
-
authenticated
Create successful authentication state containing a user.- Parameters:
principal- authenticate user- Returns:
- successful authentication state containing a user
-
authenticated
- Returns:
- successful authentication state
-
unauthenticated
- Returns:
- unsuccessful authentication state
-
isAuthenticated
public boolean isAuthenticated()- Returns:
- true if the user is authenticated
-
getAuthenticatedPrincipal
- Returns:
- the authenticated user if available
-
equals
-
hashCode
public int hashCode()
-