Class TokenProvider


  • public class TokenProvider
    extends ProtectedItemModifier
    Backport of the TokenProvider implementation present with OAK adjusted to match some subtle differences in jackrabbit token login.
    • Method Detail

      • createToken

        public org.apache.jackrabbit.core.security.authentication.token.TokenInfo createToken​(User user,
                                                                                              SimpleCredentials sc)
                                                                                       throws RepositoryException
        Create a separate token node underneath a dedicated token store within the user home node. That token node contains the hashed token, the expiration time and additional mandatory attributes that will be verified during login.
        Parameters:
        user -
        sc - The current simple credentials.
        Returns:
        A new TokenInfo or null if the token could not be created.
        Throws:
        RepositoryException
      • getTokenInfo

        public org.apache.jackrabbit.core.security.authentication.token.TokenInfo getTokenInfo​(String token)
                                                                                        throws RepositoryException
        Retrieves the token information associated with the specified login token. If no accessible Tree exists for the given token or if the token is not associated with a valid user this method returns null.
        Parameters:
        token - A valid login token.
        Returns:
        The TokenInfo associated with the specified token or null of the corresponding information does not exist or is not associated with a valid user.
        Throws:
        RepositoryException