Package com.day.crx.security.token
Class TokenUtil
- java.lang.Object
 - 
- com.day.crx.security.token.TokenUtil
 
 
- 
public class TokenUtil extends java.lang.ObjectDeprecated.since 2.5.38 (use Oak 1.7.8 or newer external IDP instead)TheTokenUtilclass provides utility methods to generate login-tokens 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AuthenticationInfocreateCredentials(HttpServletRequest request, HttpServletResponse response, SlingRepository repository, java.lang.String userId, boolean httpOnly)Deprecated.Generates a login-token for a given userId, sets the token-cookie, and returns anAuthenticationInfoobject suited for theTokenAuthenticationHandler 
 - 
 
- 
- 
Method Detail
- 
createCredentials
public static AuthenticationInfo createCredentials(HttpServletRequest request, HttpServletResponse response, SlingRepository repository, java.lang.String userId, boolean httpOnly) throws RepositoryException
Deprecated.Generates a login-token for a given userId, sets the token-cookie, and returns anAuthenticationInfoobject suited for theTokenAuthenticationHandler- Parameters:
 request- TheHttpServletRequestassociated with this authentication attemptresponse- TheHttpServletResponseon which to set the cookierepository- TheSlingRepositoryto authenticate againstuserId- The ID of the authenticating userhttpOnly- Whether or not to set theHttpOnlyattribute on the token cookie- Returns:
 - An AuthenticationInfo of type 
AUTH_TYPE - Throws:
 RepositoryException
 
 - 
 
 -