public class CredentialValidationResult
extends java.lang.Object
CredentialValidationResult
is the result from an attempt to
validate an instance of Credential
.IdentityStore.validate(jakarta.security.enterprise.credential.Credential)
Modifier and Type | Class and Description |
---|---|
static class |
CredentialValidationResult.Status |
Modifier and Type | Field and Description |
---|---|
static CredentialValidationResult |
INVALID_RESULT |
static CredentialValidationResult |
NOT_VALIDATED_RESULT |
Constructor and Description |
---|
CredentialValidationResult(CallerPrincipal callerPrincipal)
Constructor for a VALID result.
|
CredentialValidationResult(CallerPrincipal callerPrincipal,
java.util.Set<java.lang.String> groups)
Constructor for a VALID result.
|
CredentialValidationResult(java.lang.String callerName)
Constructor for a VALID result.
|
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.
|
CredentialValidationResult(java.lang.String callerName,
java.util.Set<java.lang.String> groups)
Constructor for a VALID result.
|
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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCallerDn()
Return the CallerPrincipal for the validated credential.
|
java.util.Set<java.lang.String> |
getCallerGroups()
Determines the set of groups that the specified Caller is in, based on
the associated identity store.
|
CallerPrincipal |
getCallerPrincipal()
Return the CallerPrincipal for the validated credential.
|
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).
|
java.lang.String |
getIdentityStoreId()
Return the unique ID of the identity store used to validate the credentials.
|
CredentialValidationResult.Status |
getStatus()
Determines the validation status.
|
public static final CredentialValidationResult INVALID_RESULT
public static final CredentialValidationResult NOT_VALIDATED_RESULT
public CredentialValidationResult(java.lang.String callerName)
callerName
- Name of the validated callerpublic CredentialValidationResult(CallerPrincipal callerPrincipal)
callerPrincipal
- CallerPrincipal of validated callerpublic CredentialValidationResult(java.lang.String callerName, java.util.Set<java.lang.String> groups)
callerName
- Name of the validated callergroups
- Groups associated with the caller from the identity storepublic CredentialValidationResult(CallerPrincipal callerPrincipal, java.util.Set<java.lang.String> groups)
callerPrincipal
- CallerPrincipal of validated callergroups
- Groups associated with the caller from the identity storepublic CredentialValidationResult(java.lang.String storeId, java.lang.String callerName, java.lang.String callerDn, java.lang.String callerUniqueId, java.util.Set<java.lang.String> groups)
storeId
- Identity store unique IDcallerName
- Name of the validated callercallerDn
- Caller's LDAP DN (distinguished name)callerUniqueId
- Caller's unique identifier from the identity storegroups
- Groups associated with the caller from the identity storepublic CredentialValidationResult(java.lang.String storeId, CallerPrincipal callerPrincipal, java.lang.String callerDn, java.lang.String callerUniqueId, java.util.Set<java.lang.String> groups)
storeId
- Identity store unique IDcallerPrincipal
- CallerPrincipal of validated callercallerDn
- Caller's LDAP DN (distinguished name)callerUniqueId
- Caller's unique identifier from the identity storegroups
- Groups associated with the caller from the identity storepublic CredentialValidationResult.Status getStatus()
public java.lang.String getIdentityStoreId()
public CallerPrincipal getCallerPrincipal()
public java.lang.String getCallerUniqueId()
public java.lang.String getCallerDn()
public java.util.Set<java.lang.String> getCallerGroups()