public interface TokenFactory
Token
's this should be the
only way you create a Token for CrowdModifier and Type | Method and Description |
---|---|
Token |
create(long directoryID,
String name,
TokenLifetime tokenLifetime,
List<ValidationFactor> validationFactors)
Generates a token key based on the supplied
validationFactors . |
Token |
create(long directoryID,
String name,
TokenLifetime tokenLifetime,
List<ValidationFactor> validationFactors,
long secretNumber)
Generates a token key based on the supplied
validationFactors . |
String |
createValidationHash(long directoryID,
String name,
List<ValidationFactor> validationFactors,
long secretNumber)
Generates random hash based on the supplied parameters.
|
Token create(long directoryID, String name, TokenLifetime tokenLifetime, List<ValidationFactor> validationFactors) throws InvalidTokenException
validationFactors
.directoryID
- associated directory for the Tokenname
- the name for the token, this may be the 'username' of an associated Principal or application name.tokenLifetime
- Requested lifetime of the tokenvalidationFactors
- The validation factors that are used when generating a key.InvalidTokenException
- If there was an error generating the key, usually if there was an encoding exception.Token create(long directoryID, String name, TokenLifetime tokenLifetime, List<ValidationFactor> validationFactors, long secretNumber) throws InvalidTokenException
validationFactors
.directoryID
- associated directory for the Tokenname
- the name for the token, this may be the 'username' of an associated Principal or application name.tokenLifetime
- Requested lifetime of the tokenvalidationFactors
- The validation factors that are used when generating a key.secretNumber
- The 'secret number' to add as a validation factorInvalidTokenException
- If there was an error generating the key, usually if there was an encoding exception.String createValidationHash(long directoryID, String name, List<ValidationFactor> validationFactors, long secretNumber) throws InvalidTokenException
directoryID
- associated directory for the Tokenname
- the name for the token, this may be the 'username' of an associated Principal or application name.validationFactors
- The validation factors that are used when generating a key.secretNumber
- The 'secret number' to add as a validation factorInvalidTokenException
Copyright © 2020 Atlassian. All rights reserved.