com.atlassian.crowd.manager.token.factory
Class TokenFactoryImpl
java.lang.Object
com.atlassian.crowd.manager.token.factory.TokenFactoryImpl
- All Implemented Interfaces:
- TokenFactory
public class TokenFactoryImpl
- extends java.lang.Object
- implements TokenFactory
The TokenGenerator is responsible for generating tokens when a successful authentication has occured.
|
Method Summary |
Token |
create(long directoryID,
java.lang.String name,
java.util.List<ValidationFactor> validationFactors)
Generates a token key based on the supplied validationFactors. |
Token |
create(long directoryID,
java.lang.String name,
java.util.List<ValidationFactor> validationFactors,
long secretNumber)
Generates a token key based on the supplied validationFactors. |
protected long |
createSecretValidationNumber()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenFactoryImpl
public TokenFactoryImpl(TokenKeyGenerator tokenKeyGenerator,
com.atlassian.security.random.SecureRandomService secureRandomService)
TokenFactoryImpl
public TokenFactoryImpl(TokenKeyGenerator tokenKeyGenerator)
create
public Token create(long directoryID,
java.lang.String name,
java.util.List<ValidationFactor> validationFactors)
throws InvalidTokenException
- Description copied from interface:
TokenFactory
- Generates a token key based on the supplied
validationFactors.
- Specified by:
create in interface TokenFactory
- Parameters:
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.
- Returns:
- The generated key.
- Throws:
InvalidTokenException - If there was an error generating the key, usually if there was an encoding exception.
create
public Token create(long directoryID,
java.lang.String name,
java.util.List<ValidationFactor> validationFactors,
long secretNumber)
throws InvalidTokenException
- Description copied from interface:
TokenFactory
- Generates a token key based on the supplied
validationFactors.
- Specified by:
create in interface TokenFactory
- Parameters:
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 factor
- Returns:
- The generated key.
- Throws:
InvalidTokenException - If there was an error generating the key, usually if there was an encoding exception.
createSecretValidationNumber
protected long createSecretValidationNumber()
Copyright © 2011 Atlassian. All Rights Reserved.