com.atlassian.crowd.manager.token.factory
Class TokenKeyGeneratorImpl

java.lang.Object
  extended by com.atlassian.crowd.manager.token.factory.TokenKeyGeneratorImpl
All Implemented Interfaces:
TokenKeyGenerator

public class TokenKeyGeneratorImpl
extends Object
implements TokenKeyGenerator


Constructor Summary
TokenKeyGeneratorImpl(TrustedProxyManager trustedProxyManager, String algorithm)
           
 
Method Summary
protected  void addValidationFactor(StringBuilder message, List<ValidationFactor> validationFactors, String factorName)
          If it exists, adds the validation factor specified in factorName to the message.
 String generateKey(long directoryID, String name, List<ValidationFactor> validationFactors)
          Creates a String that will be used by a Token as its key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenKeyGeneratorImpl

public TokenKeyGeneratorImpl(TrustedProxyManager trustedProxyManager,
                             String algorithm)
Method Detail

generateKey

public String generateKey(long directoryID,
                          String name,
                          List<ValidationFactor> validationFactors)
                   throws InvalidTokenException
Description copied from interface: TokenKeyGenerator
Creates a String that will be used by a Token as its key. This 'key' will be based on the passed in parameters.

Specified by:
generateKey in interface TokenKeyGenerator
Returns:
a base 64 encoded String reprentation of the passed in attributes
Throws:
InvalidTokenException

addValidationFactor

protected void addValidationFactor(StringBuilder message,
                                   List<ValidationFactor> validationFactors,
                                   String factorName)
If it exists, adds the validation factor specified in factorName to the message. Otherwise does nothing.

Parameters:
message - message to build
validationFactors - list of validation factors
factorName - name of validation factor to add


Copyright © 2013 Atlassian. All Rights Reserved.