Class TokenKeyGeneratorImpl

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

public class TokenKeyGeneratorImpl extends Object implements TokenKeyGenerator
  • Constructor Details

  • Method Details

    • generateRandomHash

      public String generateRandomHash(long directoryID, String name, List<com.atlassian.crowd.model.authentication.ValidationFactor> validationFactors) throws com.atlassian.crowd.exception.InvalidTokenException
      Description copied from interface: TokenKeyGenerator
      Creates a String that will be used by a Token as its Token.randomHash. This 'key' will be based on the passed in parameters.
      Specified by:
      generateRandomHash in interface TokenKeyGenerator
      Returns:
      a base 64 encoded String representation of the passed in attributes
      Throws:
      com.atlassian.crowd.exception.InvalidTokenException
    • generateIdentifierHash

      public String generateIdentifierHash(long directoryID, String name, List<com.atlassian.crowd.model.authentication.ValidationFactor> validationFactors) throws com.atlassian.crowd.exception.InvalidTokenException
      Description copied from interface: TokenKeyGenerator
      Creates a String that will be used by a Token as its Token.identifierHash. This 'key' will be based on the passed in parameters.
      Specified by:
      generateIdentifierHash in interface TokenKeyGenerator
      Returns:
      a base 64 encoded String representation of the passed in attributes
      Throws:
      com.atlassian.crowd.exception.InvalidTokenException
    • addValidationFactor

      protected void addValidationFactor(StringBuilder message, List<com.atlassian.crowd.model.authentication.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