public class TokenUtil
extends java.lang.Object
TokenUtil
class provides utility methods to generate login-tokensModifier and Type | Method and Description |
---|---|
static AuthenticationInfo |
createCredentials(HttpServletRequest request,
HttpServletResponse response,
SlingRepository repository,
java.lang.String userId,
boolean httpOnly)
Generates a login-token for a given userId, sets the token-cookie, and returns an
AuthenticationInfo object suited for the com.day.crx.security.token.impl.TokenAuthenticationHandler |
public static AuthenticationInfo createCredentials(HttpServletRequest request, HttpServletResponse response, SlingRepository repository, java.lang.String userId, boolean httpOnly) throws RepositoryException
AuthenticationInfo
object suited for the com.day.crx.security.token.impl.TokenAuthenticationHandler
request
- The HttpServletRequest
associated with this authentication attemptresponse
- The HttpServletResponse
on which to set the cookierepository
- The SlingRepository
to authenticate againstuserId
- The ID of the authenticating userhttpOnly
- Whether or not to set the HttpOnly
attribute on the token cookieAUTH_TYPE
RepositoryException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"