Package com.day.crx.security.token
Class TokenUtil
- java.lang.Object
-
- com.day.crx.security.token.TokenUtil
-
public class TokenUtil extends java.lang.Object
Deprecated.since 2.5.38 (use Oak 1.7.8 or newer external IDP instead)TheTokenUtil
class provides utility methods to generate login-tokens
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AuthenticationInfo
createCredentials(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 anAuthenticationInfo
object 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 anAuthenticationInfo
object suited for theTokenAuthenticationHandler
- Parameters:
request
- TheHttpServletRequest
associated with this authentication attemptresponse
- TheHttpServletResponse
on which to set the cookierepository
- TheSlingRepository
to authenticate againstuserId
- The ID of the authenticating userhttpOnly
- Whether or not to set theHttpOnly
attribute on the token cookie- Returns:
- An AuthenticationInfo of type
AUTH_TYPE
- Throws:
RepositoryException
-
-