Interface Credential

All Known Implementing Classes:
ApiKeyCredential, EmailCredential, FederatedCredential, PasskeyCredential

public interface Credential
Marker interface for credential types. Each credential implementation (e.g. JWT, API key) provides a stable UUID that can be linked to an Identity.
  • Method Summary

    Modifier and Type
    Method
    Description
    id()
    Returns the unique identifier for this credential.
    Returns the kind of this credential, reported in security events.
    default Optional<String>
    Returns a human-readable label for this credential, reported in security events.
  • Method Details

    • id

      UUID id()
      Returns the unique identifier for this credential.
      Returns:
      the credential UUID
    • kind

      default CredentialKind kind()
      Returns the kind of this credential, reported in security events.
      Returns:
      the credential kind; CredentialKind.OTHER by default
    • label

      default Optional<String> label()
      Returns a human-readable label for this credential, reported in security events.
      Returns:
      the label, or empty if none