public class TokenKeyGeneratorImpl extends Object implements TokenKeyGenerator
Constructor and Description |
---|
TokenKeyGeneratorImpl(TrustedProxyManager trustedProxyManager,
String algorithm,
Base64.Encoder encoder) |
Modifier and Type | Method and Description |
---|---|
protected void |
addValidationFactor(StringBuilder message,
List<ValidationFactor> validationFactors,
String factorName)
If it exists, adds the validation factor specified in
factorName to the message . |
String |
generateIdentifierHash(long directoryID,
String name,
List<ValidationFactor> validationFactors)
Creates a String that will be used by a
Token as its Token.identifierHash . |
String |
generateRandomHash(long directoryID,
String name,
List<ValidationFactor> validationFactors)
Creates a String that will be used by a
Token as its Token.randomHash . |
public TokenKeyGeneratorImpl(TrustedProxyManager trustedProxyManager, String algorithm, Base64.Encoder encoder)
public String generateRandomHash(long directoryID, String name, List<ValidationFactor> validationFactors) throws InvalidTokenException
TokenKeyGenerator
Token
as its Token.randomHash
.
This 'key' will be based on the passed in parameters.generateRandomHash
in interface TokenKeyGenerator
InvalidTokenException
public String generateIdentifierHash(long directoryID, String name, List<ValidationFactor> validationFactors) throws InvalidTokenException
TokenKeyGenerator
Token
as its Token.identifierHash
.
This 'key' will be based on the passed in parameters.generateIdentifierHash
in interface TokenKeyGenerator
InvalidTokenException
protected void addValidationFactor(StringBuilder message, List<ValidationFactor> validationFactors, String factorName)
factorName
to the message
.
Otherwise does nothing.message
- message to buildvalidationFactors
- list of validation factorsfactorName
- name of validation factor to addCopyright © 2021 Atlassian. All rights reserved.