Package org.wildfly.security.auth.realm
Class DistributedSecurityRealm.PrincipalDistributedIdentity
- java.lang.Object
- 
- org.wildfly.security.auth.realm.DistributedSecurityRealm.PrincipalDistributedIdentity
 
- 
- All Implemented Interfaces:
- RealmIdentity
 - Enclosing class:
- DistributedSecurityRealm
 
 final class DistributedSecurityRealm.PrincipalDistributedIdentity extends Object implements RealmIdentity 
- 
- 
Field SummaryFields Modifier and Type Field Description private RealmIdentitycurrentIdentityprivate intnextRealmprivate Principalprincipal- 
Fields inherited from interface org.wildfly.security.auth.server.RealmIdentityANONYMOUS, NON_EXISTENT
 
- 
 - 
Constructor SummaryConstructors Constructor Description PrincipalDistributedIdentity(Principal principal)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose this realm identity after a completed authentication attempt.booleanexists()Determine if the identity exists in lieu of verifying or acquiring a credential.AuthorizationIdentitygetAuthorizationIdentity()Get an authorization identity for this pre-authenticated identity.<C extends Credential>
 CgetCredential(Class<C> credentialType)Acquire a credential of the given type.<C extends Credential>
 CgetCredential(Class<C> credentialType, String algorithmName)Acquire a credential of the given type and algorithm name.<C extends Credential>
 CgetCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)Acquire a credential of the given type and algorithm name.SupportLevelgetCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)Determine whether a given credential type is definitely obtainable, possibly obtainable, or definitely not obtainable for this identity.SupportLevelgetEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName)Determine whether a given type of evidence is definitely verifiable, possibly verifiable, or definitely not verifiable.PrincipalgetRealmIdentityPrincipal()Get the principal that canonically identifies the identity within the realm.private booleannextIdentity()booleanverifyEvidence(Evidence evidence)Verify the given evidence against a credential of this identity.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.wildfly.security.auth.server.RealmIdentityapplyToCredential, applyToCredential, applyToCredential, getAttributes, getCredentialAcquireSupport, updateCredential
 
- 
 
- 
- 
- 
Field Detail- 
principalprivate final Principal principal 
 - 
currentIdentityprivate RealmIdentity currentIdentity 
 - 
nextRealmprivate int nextRealm 
 
- 
 - 
Constructor Detail- 
PrincipalDistributedIdentityPrincipalDistributedIdentity(Principal principal) throws RealmUnavailableException - Throws:
- RealmUnavailableException
 
 
- 
 - 
Method Detail- 
nextIdentityprivate boolean nextIdentity() throws RealmUnavailableException- Throws:
- RealmUnavailableException
 
 - 
getRealmIdentityPrincipalpublic Principal getRealmIdentityPrincipal() Description copied from interface:RealmIdentityGet the principal that canonically identifies the identity within the realm. This method may return the principal object which was passed in as a parameter toSecurityRealm.getRealmIdentity(Principal)(a.k.a. domain principal), but is not required to do so. Any existent realm identity (i.e. any identity which returnstrueon invocation ofRealmIdentity.exists()) must return a non-nullprincipal.- Specified by:
- getRealmIdentityPrincipalin interface- RealmIdentity
- Returns:
- the principal for this realm identity (may not be null)
 
 - 
getCredentialAcquireSupportpublic SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws RealmUnavailableException Description copied from interface:RealmIdentityDetermine whether a given credential type is definitely obtainable, possibly obtainable, or definitely not obtainable for this identity.- Specified by:
- getCredentialAcquireSupportin interface- RealmIdentity
- Parameters:
- credentialType- the exact credential type (must not be- null)
- algorithmName- the algorithm name, or- nullif any algorithm is acceptable or the credential type does not support algorithm names
- parameterSpec- the algorithm parameters to match, or- nullif any parameters are acceptable or the credential type does not support algorithm parameters
- Returns:
- the level of support for this credential type (may not be null)
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
getEvidenceVerifySupportpublic SupportLevel getEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName) throws RealmUnavailableException Description copied from interface:RealmIdentityDetermine whether a given type of evidence is definitely verifiable, possibly verifiable, or definitely not verifiable.- Specified by:
- getEvidenceVerifySupportin interface- RealmIdentity
- Parameters:
- evidenceType- the type of evidence to be verified (must not be- null)
- algorithmName- the algorithm name, or- nullif any algorithm is acceptable or the evidence type does not support algorithm names
- Returns:
- the level of support for this evidence type
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
getCredentialpublic <C extends Credential> C getCredential(Class<C> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws RealmUnavailableException Description copied from interface:RealmIdentityAcquire a credential of the given type and algorithm name. Realms which support more than one credential of a given type and algorithm must override this method.- Specified by:
- getCredentialin interface- RealmIdentity
- Type Parameters:
- C- the credential type
- Parameters:
- credentialType- the credential type class (must not be- null)
- algorithmName- the algorithm name, or- nullif any algorithm is acceptable or the credential type does not support algorithm names
- parameterSpec- the algorithm parameters to match, or- nullif any parameters are acceptable or the credential type does not support algorithm parameters
- Returns:
- the credential, or nullif no such credential exists
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
getCredentialpublic <C extends Credential> C getCredential(Class<C> credentialType, String algorithmName) throws RealmUnavailableException Description copied from interface:RealmIdentityAcquire a credential of the given type and algorithm name. Realms which support more than one credential of a given type must override this method.- Specified by:
- getCredentialin interface- RealmIdentity
- Type Parameters:
- C- the credential type
- Parameters:
- credentialType- the credential type class (must not be- null)
- algorithmName- the algorithm name, or- nullif any algorithm is acceptable or the credential type does not support algorithm names
- Returns:
- the credential, or nullif no such credential exists
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
getCredentialpublic <C extends Credential> C getCredential(Class<C> credentialType) throws RealmUnavailableException Description copied from interface:RealmIdentityAcquire a credential of the given type.- Specified by:
- getCredentialin interface- RealmIdentity
- Type Parameters:
- C- the credential type
- Parameters:
- credentialType- the credential type class (must not be- null)
- Returns:
- the credential, or nullif no such credential exists
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
verifyEvidencepublic boolean verifyEvidence(Evidence evidence) throws RealmUnavailableException Description copied from interface:RealmIdentityVerify the given evidence against a credential of this identity. The credential to be used is selected based on the evidence type.- Specified by:
- verifyEvidencein interface- RealmIdentity
- Parameters:
- evidence- the evidence to verify
- Returns:
- trueif verification was successful,- falseotherwise
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
existspublic boolean exists() throws RealmUnavailableExceptionDescription copied from interface:RealmIdentityDetermine if the identity exists in lieu of verifying or acquiring a credential. This method is intended to be used to verify an identity for non-authentication purposes only. Implementations of this method should returnfalseup until the point it is known that a call toRealmIdentity.getAuthorizationIdentity()can successfully return an identity. If a realm can load an identity independently of credential acquisition and evidence verification if not already loaded it should be loaded at the time of this call to return an accurate result.- Specified by:
- existsin interface- RealmIdentity
- Returns:
- trueif the identity exists in this realm,- falseotherwise
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
getAuthorizationIdentitypublic AuthorizationIdentity getAuthorizationIdentity() throws RealmUnavailableException Description copied from interface:RealmIdentityGet an authorization identity for this pre-authenticated identity.- Specified by:
- getAuthorizationIdentityin interface- RealmIdentity
- Returns:
- the authorization identity (may not be null)
- Throws:
- RealmUnavailableException- if the realm is not able to handle requests for any reason
 
 - 
disposepublic void dispose() Description copied from interface:RealmIdentityDispose this realm identity after a completed authentication attempt.- Specified by:
- disposein interface- RealmIdentity
 
 
- 
 
-