Class TokenUtil


  • public class TokenUtil
    extends java.lang.Object
    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

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static AuthenticationInfo createCredentials​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.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 an AuthenticationInfo object suited for the TokenAuthenticationHandler
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createCredentials

        public static AuthenticationInfo createCredentials​(javax.servlet.http.HttpServletRequest request,
                                                           javax.servlet.http.HttpServletResponse response,
                                                           SlingRepository repository,
                                                           java.lang.String userId,
                                                           boolean httpOnly)
                                                    throws javax.jcr.RepositoryException
        Deprecated.
        Generates a login-token for a given userId, sets the token-cookie, and returns an AuthenticationInfo object suited for the TokenAuthenticationHandler
        Parameters:
        request - The HttpServletRequest associated with this authentication attempt
        response - The HttpServletResponse on which to set the cookie
        repository - The SlingRepository to authenticate against
        userId - The ID of the authenticating user
        httpOnly - Whether or not to set the HttpOnly attribute on the token cookie
        Returns:
        An AuthenticationInfo of type AUTH_TYPE
        Throws:
        javax.jcr.RepositoryException