Package org.wildfly.security.auth.realm
Class FailoverSecurityRealm
java.lang.Object
org.wildfly.security.auth.realm.FailoverSecurityRealm
- All Implemented Interfaces:
SecurityRealm
A realm which wraps one realm and fails over to another in case the first is unavailable.
- Author:
- Martin Mazanek
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SecurityRealmprotected final Consumer<RealmUnavailableException>protected final SecurityRealmFields inherited from interface org.wildfly.security.auth.server.SecurityRealm
EMPTY_REALM -
Constructor Summary
ConstructorsConstructorDescriptionFailoverSecurityRealm(SecurityRealm delegateRealm, SecurityRealm failoverRealm, Consumer<RealmUnavailableException> failoverCallback) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected RealmIdentitycreateFailoverIdentity(RealmIdentity identity, Principal principal) protected RealmIdentitycreateFailoverIdentity(RealmIdentity identity, Evidence evidence) getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) getEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName) getRealmIdentity(Principal principal) getRealmIdentity(Evidence evidence) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.auth.server.SecurityRealm
getCredentialAcquireSupport, getRealmIdentity, handleRealmEvent
-
Field Details
-
delegateRealm
-
failoverRealm
-
failoverCallback
-
-
Constructor Details
-
FailoverSecurityRealm
public FailoverSecurityRealm(SecurityRealm delegateRealm, SecurityRealm failoverRealm, Consumer<RealmUnavailableException> failoverCallback) Construct a new instance.- Parameters:
delegateRealm- the wrapped realmfailoverRealm- the realm to use in case delegateRealm is unavailablefailoverCallback- callback function that gets called in case delegateRealm is unavailable
-
-
Method Details
-
getRealmIdentity
- Specified by:
getRealmIdentityin interfaceSecurityRealm- Throws:
RealmUnavailableException
-
getRealmIdentity
- Specified by:
getRealmIdentityin interfaceSecurityRealm- Throws:
RealmUnavailableException
-
getCredentialAcquireSupport
public SupportLevel getCredentialAcquireSupport(Class<? extends Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws RealmUnavailableException - Specified by:
getCredentialAcquireSupportin interfaceSecurityRealm- Throws:
RealmUnavailableException
-
getEvidenceVerifySupport
public SupportLevel getEvidenceVerifySupport(Class<? extends Evidence> evidenceType, String algorithmName) throws RealmUnavailableException - Specified by:
getEvidenceVerifySupportin interfaceSecurityRealm- Throws:
RealmUnavailableException
-
createFailoverIdentity
-
createFailoverIdentity
-