com.atlassian.crowd.authentication
Class TokenFactoryImpl
java.lang.Object
com.atlassian.crowd.authentication.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,
java.lang.String secretNumber)
Generates a token key based on the supplied validationFactors . |
protected java.lang.String |
createSecretValidationNumber()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TokenFactoryImpl
public TokenFactoryImpl(TokenKeyGenerator tokenKeyGenerator,
java.util.Random randomNumberGenerator)
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,
java.lang.String 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 java.lang.String createSecretValidationNumber()
Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.