public class TokenUtil extends Object
TokenUtil
class provides utility methods to generate login-tokensModifier and Type | Method and Description |
---|---|
static AuthenticationInfo |
createCredentials(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
SlingRepository repository,
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(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SlingRepository repository, 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 © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"