Class PersistentResourceTokenGenerator
- java.lang.Object
-
- org.silverpeas.core.security.token.persistent.PersistentResourceTokenGenerator
-
- All Implemented Interfaces:
TokenGenerator
public class PersistentResourceTokenGenerator extends Object implements TokenGenerator
A generator of PersistentResourceToken instances.- Author:
- mmoquillon
-
-
Field Summary
Fields Modifier and Type Field Description static String
RESOURCE_PARAM
The parameter refers the resource for which the token is.
-
Constructor Summary
Constructors Constructor Description PersistentResourceTokenGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PersistentResourceToken
generate(TokenGenerationParameter... parameters)
Generates a new token by taking into account any of the specified generation parameters.<T extends Token>
Trenew(T token)
Renews the specified token.
-
-
-
Field Detail
-
RESOURCE_PARAM
public static final String RESOURCE_PARAM
The parameter refers the resource for which the token is. The value of the parameter must be anEntityReference
to the resource.- See Also:
- Constant Field Values
-
-
Method Detail
-
generate
public PersistentResourceToken generate(TokenGenerationParameter... parameters)
Description copied from interface:TokenGenerator
Generates a new token by taking into account any of the specified generation parameters.- Specified by:
generate
in interfaceTokenGenerator
- Parameters:
parameters
- both the identifier and the type of the resource the token to generate has to be belong.- Returns:
- a new token.
-
renew
public <T extends Token> T renew(T token)
Description copied from interface:TokenGenerator
Renews the specified token. The token value will be regenerated.- Specified by:
renew
in interfaceTokenGenerator
- Type Parameters:
T
- the concrete type of the token to renew.- Parameters:
token
- the token to renew.- Returns:
- the renewed token.
-
-