public class TokenUtil extends Object
TokenUtil class provides utility methods to generate login-tokens| Modifier and Type | Method and Description |
|---|---|
static AuthenticationInfo |
createCredentials(HttpServletRequest request,
HttpServletResponse response,
SlingRepository repository,
String userId,
boolean httpOnly)
Deprecated.
Generates a login-token for a given userId, sets the token-cookie, and returns an
AuthenticationInfo object suited for the TokenAuthenticationHandler |
public static AuthenticationInfo createCredentials(HttpServletRequest request, HttpServletResponse response, SlingRepository repository, String userId, boolean httpOnly) throws RepositoryException
AuthenticationInfo object suited for the TokenAuthenticationHandlerrequest - 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_TYPERepositoryExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved