|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.plugin.rest.service.controller.TokenController
public class TokenController
Performs token authentication for the user.
| Constructor Summary | |
|---|---|
TokenController(TokenAuthenticationManager tokenAuthenticationManager)
|
|
| Method Summary | |
|---|---|
SessionEntity |
authenticateUser(java.lang.String applicationName,
java.lang.String username,
java.lang.String password,
java.util.Collection<ValidationFactorEntity> validationFactorEntities,
java.net.URI baseUri)
Authenticates a user for the given application. |
SessionEntity |
authenticateUserWithoutValidatingPassword(java.lang.String applicationName,
java.lang.String username,
java.util.Collection<ValidationFactorEntity> validationFactorEntities,
java.net.URI baseUri)
Feigns the authentication process for a user and creates a token for the authentication without validating the password. |
UserEntity |
getUserFromToken(java.lang.String token,
java.lang.String applicationName,
java.net.URI baseUri)
Returns the user associated with the Crowd SSO token. |
void |
invalidateToken(java.lang.String token)
Invalidates a token. |
SessionEntity |
validateToken(java.lang.String applicationName,
java.lang.String token,
java.util.Collection<ValidationFactorEntity> validationFactorEntities,
java.net.URI baseUri)
Validates a Crowd SSO token and creates a new token with an updated last accessed date (for the internal token representation). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TokenController(TokenAuthenticationManager tokenAuthenticationManager)
| Method Detail |
|---|
public SessionEntity authenticateUser(java.lang.String applicationName,
java.lang.String username,
java.lang.String password,
java.util.Collection<ValidationFactorEntity> validationFactorEntities,
java.net.URI baseUri)
throws InvalidAuthenticationException,
InactiveAccountException,
ExpiredCredentialException,
ApplicationAccessDeniedException,
OperationFailedException
applicationName - name of the applicationusername - name of the userpassword - password of the uservalidationFactorEntities - validation factorsbaseUri - base URI of the REST service
InvalidAuthenticationException - if the authentication was not successful
InactiveAccountException - if the user account is marked as inactive
ExpiredCredentialException - if the user credential has expired and the user needs to set a new password
ApplicationAccessDeniedException - if the user does not have access to authenticate with the application
OperationFailedException - if the operation failed for any other reason
public SessionEntity authenticateUserWithoutValidatingPassword(java.lang.String applicationName,
java.lang.String username,
java.util.Collection<ValidationFactorEntity> validationFactorEntities,
java.net.URI baseUri)
throws InvalidAuthenticationException,
InactiveAccountException,
ExpiredCredentialException,
ApplicationAccessDeniedException,
OperationFailedException
authenticateUser(String, String, String, java.util.Collection, java.net.URI) method.
applicationName - name of the applicationusername - name of the uservalidationFactorEntities - validation factorsbaseUri - base URI of the REST service
InvalidAuthenticationException - if the authentication was not successful
InactiveAccountException - if the user account is marked as inactive
ExpiredCredentialException - if the user credential has expired and the user needs to set a new password
ApplicationAccessDeniedException - if the user does not have access to authenticate with the application
OperationFailedException - if the operation failed for any other reasonpublic void invalidateToken(java.lang.String token)
token - Token to invalidate
public SessionEntity validateToken(java.lang.String applicationName,
java.lang.String token,
java.util.Collection<ValidationFactorEntity> validationFactorEntities,
java.net.URI baseUri)
throws InvalidTokenException,
ApplicationAccessDeniedException,
OperationFailedException
applicationName - Name of the applicationtoken - Crowd SSO tokenvalidationFactorEntities - validation factorsbaseUri - base URI of the REST service
InvalidTokenException - if the token or validation factors are not valid.
ApplicationAccessDeniedException - if the user is not allowed to authenticate with the application.
OperationFailedException - if the application failed for any other reason.
public UserEntity getUserFromToken(java.lang.String token,
java.lang.String applicationName,
java.net.URI baseUri)
throws InvalidTokenException,
OperationFailedException,
ApplicationAccessDeniedException
token - Crowd SSO tokenapplicationName - name of the current applicationbaseUri - base URI of the REST service
InvalidTokenException - if the token could not be found
OperationFailedException - if the operation failed for any other reason.
ApplicationAccessDeniedException - if the user does not have access to authenticate with the application
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||