Class CredentialValidationResult

java.lang.Object
jakarta.security.enterprise.identitystore.CredentialValidationResult

public class CredentialValidationResult
extends java.lang.Object
CredentialValidationResult is the result from an attempt to validate an instance of Credential.
See Also:
IdentityStore.validate(jakarta.security.enterprise.credential.Credential)
  • Field Details

  • Constructor Details

    • CredentialValidationResult

      public CredentialValidationResult​(java.lang.String callerName)
      Constructor for a VALID result.
      Parameters:
      callerName - Name of the validated caller
    • CredentialValidationResult

      public CredentialValidationResult​(CallerPrincipal callerPrincipal)
      Constructor for a VALID result.
      Parameters:
      callerPrincipal - CallerPrincipal of validated caller
    • CredentialValidationResult

      public CredentialValidationResult​(java.lang.String callerName, java.util.Set<java.lang.String> groups)
      Constructor for a VALID result.
      Parameters:
      callerName - Name of the validated caller
      groups - Groups associated with the caller from the identity store
    • CredentialValidationResult

      public CredentialValidationResult​(CallerPrincipal callerPrincipal, java.util.Set<java.lang.String> groups)
      Constructor for a VALID result.
      Parameters:
      callerPrincipal - CallerPrincipal of validated caller
      groups - Groups associated with the caller from the identity store
    • CredentialValidationResult

      public CredentialValidationResult​(java.lang.String storeId, java.lang.String callerName, java.lang.String callerDn, java.lang.String callerUniqueId, java.util.Set<java.lang.String> groups)
      Constructor for a VALID result.
      Parameters:
      storeId - Identity store unique ID
      callerName - Name of the validated caller
      callerDn - Caller's LDAP DN (distinguished name)
      callerUniqueId - Caller's unique identifier from the identity store
      groups - Groups associated with the caller from the identity store
    • CredentialValidationResult

      public CredentialValidationResult​(java.lang.String storeId, CallerPrincipal callerPrincipal, java.lang.String callerDn, java.lang.String callerUniqueId, java.util.Set<java.lang.String> groups)
      Constructor for a VALID result.
      Parameters:
      storeId - Identity store unique ID
      callerPrincipal - CallerPrincipal of validated caller
      callerDn - Caller's LDAP DN (distinguished name)
      callerUniqueId - Caller's unique identifier from the identity store
      groups - Groups associated with the caller from the identity store
  • Method Details

    • getStatus

      Determines the validation status.
      Returns:
      The validation status
    • getIdentityStoreId

      public java.lang.String getIdentityStoreId()
      Return the unique ID of the identity store used to validate the credentials.
      Returns:
      String identifying the external store used to validate credentials.
    • getCallerPrincipal

      public CallerPrincipal getCallerPrincipal()
      Return the CallerPrincipal for the validated credential.
      Returns:
      The CallerPrincipal.
    • getCallerUniqueId

      public java.lang.String getCallerUniqueId()
      Return a string that uniquely identifies this caller within the identity store (since the Principal name used may not be unique).
      Returns:
      Caller's unique identifier.
    • getCallerDn

      public java.lang.String getCallerDn()
      Return the CallerPrincipal for the validated credential.
      Returns:
      The CallerPrincipal.
    • getCallerGroups

      public java.util.Set<java.lang.String> getCallerGroups()
      Determines the set of groups that the specified Caller is in, based on the associated identity store.
      Returns:
      The set of groups that the specified Caller is in, or empty if none.