Top Description Inners Fields Constructors Methods
jakarta.security.enterprise.identitystore

public Class CredentialValidationResult

extends Object
Class Inheritance
Static Imports
jakarta.security.enterprise.identitystore.CredentialValidationResult.Status.INVALID, .CredentialValidationResult.Status.NOT_VALIDATED, .CredentialValidationResult.Status.VALID, java.util.Collections.emptySet, .Collections.unmodifiableSet

CredentialValidationResult is the result from an attempt to validate an instance of Credential.
See Also
IdentityStore#validate

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private final String
private final CallerPrincipal
private final String
private final Set<String>
public static final CredentialValidationResult
public static final CredentialValidationResult
private final CredentialValidationResult.Status
private final String

Constructor Summary

AccessConstructor and Description
private
CredentialValidationResult(CredentialValidationResult.Status status)

Constructor for any result other than VALID.

public
CredentialValidationResult(String
Name of the validated caller
callerName
)

Constructor for a VALID result.

public
CredentialValidationResult(CallerPrincipal
CallerPrincipal of validated caller
callerPrincipal
)

Constructor for a VALID result.

public
CredentialValidationResult(String
Name of the validated caller
callerName
,
Set<String>
Groups associated with the caller from the identity store
groups
)

Constructor for a VALID result.

public
CredentialValidationResult(CallerPrincipal
CallerPrincipal of validated caller
callerPrincipal
,
Set<String>
Groups associated with the caller from the identity store
groups
)

Constructor for a VALID result.

public
CredentialValidationResult(String
Identity store unique ID
storeId
,
String
Name of the validated caller
callerName
,
String
Caller's LDAP DN (distinguished name)
callerDn
,
String
Caller's unique identifier from the identity store
callerUniqueId
,
Set<String>
Groups associated with the caller from the identity store
groups
)

Constructor for a VALID result.

public
CredentialValidationResult(String
Identity store unique ID
storeId
,
CallerPrincipal
CallerPrincipal of validated caller
callerPrincipal
,
String
Caller's LDAP DN (distinguished name)
callerDn
,
String
Caller's unique identifier from the identity store
callerUniqueId
,
Set<String>
Groups associated with the caller from the identity store
groups
)

Constructor for a VALID result.

private
CredentialValidationResult(CredentialValidationResult.Status
The result status
status
,
String
Identity store unique ID
storeId
,
CallerPrincipal
CallerPrincipal of validated caller
callerPrincipal
,
String
Caller's LDAP DN (distinguished name)
callerDn
,
String
Caller's unique identifier from the identity store
callerUniqueId
,
Set<String>
Groups associated with the caller from the identity store
groups
)

Private constructor.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The CallerPrincipal.
getCallerDn
()

Return the CallerPrincipal for the validated credential.

public Set<String>

Returns:

The set of groups that the specified Caller is in, or empty if none.
getCallerGroups
()

Determines the set of groups that the specified Caller is in, based on the associated identity store.

public CallerPrincipal

Returns:

The CallerPrincipal.
getCallerPrincipal
()

Return the CallerPrincipal for the validated credential.

public String

Returns:

Caller's unique identifier.
getCallerUniqueId
()

Return a string that uniquely identifies this caller within the identity store (since the Principal name used may not be unique).

public String

Returns:

String identifying the external store used to validate credentials.
getIdentityStoreId
()

Return the unique ID of the identity store used to validate the credentials.

public CredentialValidationResult.Status

Returns:

The validation status
getStatus
()

Determines the validation status.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

callerDnback to summary
private final String callerDn
callerPrincipalback to summary
private final CallerPrincipal callerPrincipal
callerUniqueIdback to summary
private final String callerUniqueId
groupsback to summary
private final Set<String> groups
INVALID_RESULTback to summary
public static final CredentialValidationResult INVALID_RESULT
NOT_VALIDATED_RESULTback to summary
public static final CredentialValidationResult NOT_VALIDATED_RESULT
statusback to summary
private final CredentialValidationResult.Status status
storeIdback to summary
private final String storeId

Constructor Detail

CredentialValidationResultback to summary
private CredentialValidationResult(CredentialValidationResult.Status status)

Constructor for any result other than VALID. Used only internally to construct the static status instances.

CredentialValidationResultback to summary
public CredentialValidationResult(String callerName)

Constructor for a VALID result.

Parameters
callerName:String

Name of the validated caller

CredentialValidationResultback to summary
public CredentialValidationResult(CallerPrincipal callerPrincipal)

Constructor for a VALID result.

Parameters
callerPrincipal:CallerPrincipal

CallerPrincipal of validated caller

CredentialValidationResultback to summary
public CredentialValidationResult(String callerName, Set<String> groups)

Constructor for a VALID result.

Parameters
callerName:String

Name of the validated caller

groups:Set<String>

Groups associated with the caller from the identity store

CredentialValidationResultback to summary
public CredentialValidationResult(CallerPrincipal callerPrincipal, Set<String> groups)

Constructor for a VALID result.

Parameters
callerPrincipal:CallerPrincipal

CallerPrincipal of validated caller

groups:Set<String>

Groups associated with the caller from the identity store

CredentialValidationResultback to summary
public CredentialValidationResult(String storeId, String callerName, String callerDn, String callerUniqueId, Set<String> groups)

Constructor for a VALID result.

Parameters
storeId:String

Identity store unique ID

callerName:String

Name of the validated caller

callerDn:String

Caller's LDAP DN (distinguished name)

callerUniqueId:String

Caller's unique identifier from the identity store

groups:Set<String>

Groups associated with the caller from the identity store

CredentialValidationResultback to summary
public CredentialValidationResult(String storeId, CallerPrincipal callerPrincipal, String callerDn, String callerUniqueId, Set<String> groups)

Constructor for a VALID result.

Parameters
storeId:String

Identity store unique ID

callerPrincipal:CallerPrincipal

CallerPrincipal of validated caller

callerDn:String

Caller's LDAP DN (distinguished name)

callerUniqueId:String

Caller's unique identifier from the identity store

groups:Set<String>

Groups associated with the caller from the identity store

CredentialValidationResultback to summary
private CredentialValidationResult(CredentialValidationResult.Status status, String storeId, CallerPrincipal callerPrincipal, String callerDn, String callerUniqueId, Set<String> groups)

Private constructor.

Parameters
status:CredentialValidationResult.Status

The result status

storeId:String

Identity store unique ID

callerPrincipal:CallerPrincipal

CallerPrincipal of validated caller

callerDn:String

Caller's LDAP DN (distinguished name)

callerUniqueId:String

Caller's unique identifier from the identity store

groups:Set<String>

Groups associated with the caller from the identity store

Method Detail

getCallerDnback to summary
public String getCallerDn()

Return the CallerPrincipal for the validated credential.

Returns:String

The CallerPrincipal.

getCallerGroupsback to summary
public Set<String> getCallerGroups()

Determines the set of groups that the specified Caller is in, based on the associated identity store.

Returns:Set<String>

The set of groups that the specified Caller is in, or empty if none.

getCallerPrincipalback to summary
public CallerPrincipal getCallerPrincipal()

Return the CallerPrincipal for the validated credential.

Returns:CallerPrincipal

The CallerPrincipal.

getCallerUniqueIdback to summary
public String getCallerUniqueId()

Return a string that uniquely identifies this caller within the identity store (since the Principal name used may not be unique).

Returns:String

Caller's unique identifier.

getIdentityStoreIdback to summary
public String getIdentityStoreId()

Return the unique ID of the identity store used to validate the credentials.

Returns:String

String identifying the external store used to validate credentials.

getStatusback to summary
public CredentialValidationResult.Status getStatus()

Determines the validation status.

Returns:CredentialValidationResult.Status

The validation status

jakarta.security.enterprise.identitystore back to summary

public final Enum CredentialValidationResult.Status

extends Enum<CredentialValidationResult.Status>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final CredentialValidationResult.Status
INVALID

Indicates that the credential is not valid after a validation attempt.

public static final CredentialValidationResult.Status
NOT_VALIDATED

Indicates that the credential could not be validated

public static final CredentialValidationResult.Status
VALID

Indicates that the credential is valid after a validation attempt.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CredentialValidationResult.Status
public static CredentialValidationResult.Status[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INVALIDback to summary
public static final CredentialValidationResult.Status INVALID

Indicates that the credential is not valid after a validation attempt.

NOT_VALIDATEDback to summary
public static final CredentialValidationResult.Status NOT_VALIDATED

Indicates that the credential could not be validated

VALIDback to summary
public static final CredentialValidationResult.Status VALID

Indicates that the credential is valid after a validation attempt.

Constructor Detail

Statusback to summary
private Status()

Method Detail

valueOfback to summary
public static CredentialValidationResult.Status valueOf(String name)
valuesback to summary
public static CredentialValidationResult.Status[] values()