Class TokenProvider
- java.lang.Object
-
- org.apache.jackrabbit.core.ProtectedItemModifier
-
- org.apache.jackrabbit.core.security.authentication.token.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.jackrabbit.core.security.authentication.token.TokenInfo
createToken(User user, SimpleCredentials sc)
Create a separate token node underneath a dedicated token store within the user home node.org.apache.jackrabbit.core.security.authentication.token.TokenInfo
getTokenInfo(String token)
Retrieves the token information associated with the specified login token.-
Methods inherited from class org.apache.jackrabbit.core.ProtectedItemModifier
addNode, addNode, markModified, performProtected, removeItem, setProperty, setProperty, setProperty, setProperty
-
-
-
-
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
ornull
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 accessibleTree
exists for the given token or if the token is not associated with a valid user this method returnsnull
.- Parameters:
token
- A valid login token.- Returns:
- The
TokenInfo
associated with the specified token ornull
of the corresponding information does not exist or is not associated with a valid user. - Throws:
RepositoryException
-
-