Package com.codingchili.core.security
Class TokenIdentifier
java.lang.Object
com.codingchili.core.security.TokenIdentifier
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 Summary
ConstructorDescriptionCreate a new empty identifier.TokenIdentifier(String service, String secret)
Creates a new identifier with the target service and secret name set. -
Method Summary
-
Constructor Details
-
TokenIdentifier
public TokenIdentifier()Create a new empty identifier. -
TokenIdentifier
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
- Returns:
- the name of the service that owns the secret used for signing the token.
-
setService
- Parameters:
service
- the name of the service that owns the secret used for signing the token.- Returns:
- fluent
-
getSecret
- Returns:
- the name of the secret from the target service to use to sign the token.
-
setSecret
- Parameters:
secret
- the name of the secret from the target service to use to sign the token.- Returns:
- fluent
-