com.atlassian.crowd.authentication
Interface TokenFactory

All Known Implementing Classes:
TokenFactoryImpl

public interface TokenFactory

Reponsible for the creation of Token's this should be the only way you create a Token for Crowd


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.
 

Method Detail

create

Token create(long directoryID,
             java.lang.String name,
             java.util.List<ValidationFactor> validationFactors)
             throws InvalidTokenException
Generates a token key based on the supplied validationFactors.

Parameters:
directoryID - associated directory for the Token
name - 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

Token create(long directoryID,
             java.lang.String name,
             java.util.List<ValidationFactor> validationFactors,
             java.lang.String secretNumber)
             throws InvalidTokenException
Generates a token key based on the supplied validationFactors.

Parameters:
directoryID - associated directory for the Token
name - 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.


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.