Class TokenIdentifier

java.lang.Object
com.codingchili.core.security.TokenIdentifier

public class TokenIdentifier extends Object
Declares a security dependency on another service. Using a token identifier it is possible to generate a token that is signed with the secret of the specified service. The secret that is used here should match the declared secret on the service object. This is a name and not the actual value of the secret, this will be generated. Used with the AuthenticationGenerator.
  • Constructor Details

    • TokenIdentifier

      public TokenIdentifier()
      Create a new empty identifier.
    • TokenIdentifier

      public TokenIdentifier(String service, String secret)
      Creates a new identifier with the target service and secret name set.
      Parameters:
      service - the name of the service a token should be generated for.
      secret - the name of the service to use when signing the token.
  • Method Details

    • getService

      public String getService()
      Returns:
      the name of the service that owns the secret used for signing the token.
    • setService

      public TokenIdentifier setService(String service)
      Parameters:
      service - the name of the service that owns the secret used for signing the token.
      Returns:
      fluent
    • getSecret

      public String getSecret()
      Returns:
      the name of the secret from the target service to use to sign the token.
    • setSecret

      public TokenIdentifier setSecret(String secret)
      Parameters:
      secret - the name of the secret from the target service to use to sign the token.
      Returns:
      fluent