Class TokenCredentials

java.lang.Object
io.inverno.mod.security.authentication.TokenCredentials
All Implemented Interfaces:
Credentials

public class TokenCredentials extends Object implements Credentials

Credentials used to authenticate an entity based on a verifiable token.

A token is shared between the entity and the authenticator and must be verifiable during the authentication process. A token might be generated by an authority trusted by both the entity and the application, each party being then able to obtain or authenticate the token to the trusted authority. Other approaches might also include symmetric or asymmetric cryptographic processing.

In order to provide proper security, implementations should choose properly secured tokens which are collision-free and hardly forgeable.

Since:
1.5
Author:
Jeremy Kuhn
  • Constructor Details Link icon

    • TokenCredentials Link icon

      public TokenCredentials(String token)

      Creates a token credentials with the specified value.

      Parameters:
      token - a token
  • Method Details Link icon

    • getToken Link icon

      public String getToken()

      Returns the token value.

      Returns:
      a token