Class TokenResource
java.lang.Object
com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
com.atlassian.crowd.plugin.rest.service.resource.usermanagement.TokenResource
@Path("session")
@Produces({"application/xml","application/json"})
@Consumes({"application/xml","application/json"})
public class TokenResource
extends AbstractResource
Crowd SSO Token Resource.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerSystemPropertySet a system property with this name to define the max-age of the 'Cache-Control' header in the response of the token validation and get user operations on this resource.Fields inherited from class com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
APPLICATION_SCOPE, request, uriInfo -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseauthenticateUser(AuthenticationContextEntity authenticationContext, boolean validatePassword, long durationInSeconds) jakarta.ws.rs.core.ResponsedeleteTokensForUser(String username, String exclusionToken) jakarta.ws.rs.core.ResponsegetSession(String token) jakarta.ws.rs.core.ResponseinvalidateToken(String token) jakarta.ws.rs.core.ResponsevalidateToken(String token, ValidationFactorEntityList validationFactors) Methods inherited from class com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
getApplicationName, getBaseUri, setApplicationName, setRequest, setUriInfo
-
Field Details
-
TOKEN_CACHE_CONTROL_MAX_AGE_SYSTEM_PROPERTY
Set a system property with this name to define the max-age of the 'Cache-Control' header in the response of the token validation and get user operations on this resource. The default value (negative) means that the 'Cache-Control' header will not be sent, which was the previous behaviour until this system property was added.
-
-
Constructor Details
-
TokenResource
-
-
Method Details
-
authenticateUser
@POST public jakarta.ws.rs.core.Response authenticateUser(AuthenticationContextEntity authenticationContext, @DefaultValue("true") @QueryParam("validate-password") boolean validatePassword, @DefaultValue("-1") @QueryParam("duration") long durationInSeconds) throws InvalidAuthenticationException, InactiveAccountException, ExpiredCredentialException, ApplicationAccessDeniedException, OperationFailedException -
invalidateToken
@DELETE @Path("{token}") public jakarta.ws.rs.core.Response invalidateToken(@PathParam("token") String token) -
validateToken
@POST @Path("{token}") public jakarta.ws.rs.core.Response validateToken(@PathParam("token") String token, ValidationFactorEntityList validationFactors) throws InvalidTokenException, ApplicationAccessDeniedException, OperationFailedException -
getSession
@GET @Path("{token}") public jakarta.ws.rs.core.Response getSession(@PathParam("token") String token) throws InvalidTokenException, OperationFailedException, ApplicationAccessDeniedException -
deleteTokensForUser
-