Interface Credentials

All Superinterfaces:
Serializable
All Known Implementing Classes:
PasswordCredentials, TokenCredentials

public interface Credentials extends Serializable
The credentials presented by a client to prove its identity.

Credentials are attached to the SessionInfo and travel to the application server via TRIP, where the AuthenticationManager hands them to the AuthenticationProviders that support them.

Tentackle ships PasswordCredentials (the traditional username/password login) and TokenCredentials (bearer tokens, such as OAuth2 access tokens or OIDC ID tokens). Applications may add their own, as long as they are serializable and their package is opened to org.tentackle.core for TRIP.

Implementations must keep confidential parts in a Secret, so that they are encrypted in memory whenever a Cryptor is configured.

Author:
harald
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all confidential parts.
    Will remove them from memory by overwriting the corresponding arrays.
    Clones the credentials.
    Confidential parts are physically copied, since they may be cleared later.
    Gets the name of the authentication scheme these credentials belong to.
  • Method Details

    • getScheme

      String getScheme()
      Gets the name of the authentication scheme these credentials belong to.

      The scheme is what an AuthenticationProvider and a CredentialsProvider agree upon, for example "password" or "bearer".

      Returns:
      the scheme, never null
    • clear

      void clear()
      Clears all confidential parts.
      Will remove them from memory by overwriting the corresponding arrays.
    • clone

      Credentials clone()
      Clones the credentials.
      Confidential parts are physically copied, since they may be cleared later.
      Returns:
      the cloned credentials