Package com.day.crx.security.token
Class TokenUtil
java.lang.Object
com.day.crx.security.token.TokenUtil
Deprecated.
since 2.5.38 (use Oak 1.7.8 or newer external IDP instead)
The
TokenUtil class provides utility methods to generate login-tokens-
Method Summary
Modifier and TypeMethodDescriptionstatic AuthenticationInfocreateCredentials(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 anAuthenticationInfoobject suited for theTokenAuthenticationHandler
-
Method Details
-
createCredentials
public static AuthenticationInfo createCredentials(HttpServletRequest request, HttpServletResponse response, SlingRepository repository, 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
-