Class CachingSecurityRealm
java.lang.Object
org.wildfly.security.auth.realm.CachingSecurityRealm
- All Implemented Interfaces:
org.wildfly.security.auth.server.SecurityRealm
- Direct Known Subclasses:
CachingModifiableSecurityRealm
public class CachingSecurityRealm
extends Object
implements org.wildfly.security.auth.server.SecurityRealm
A wrapper class that provides caching capabilities for a SecurityRealm and its identities.
- Author:
- Pedro Igor
-
Field Summary
Fields inherited from interface org.wildfly.security.auth.server.SecurityRealm
EMPTY_REALM -
Constructor Summary
ConstructorsConstructorDescriptionCachingSecurityRealm(org.wildfly.security.auth.server.SecurityRealm realm, org.wildfly.security.cache.RealmIdentityCache cache) Creates a new instance.CachingSecurityRealm(org.wildfly.security.auth.server.SecurityRealm realm, org.wildfly.security.cache.RealmIdentityCache cache, Supplier<Provider[]> providerSupplier) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.wildfly.security.auth.server.SecurityRealmGets wrapped backing realm.org.wildfly.security.auth.SupportLevelgetCredentialAcquireSupport(Class<? extends org.wildfly.security.credential.Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) org.wildfly.security.auth.SupportLevelgetEvidenceVerifySupport(Class<? extends org.wildfly.security.evidence.Evidence> evidenceType, String algorithmName) org.wildfly.security.auth.server.RealmIdentitygetRealmIdentity(Principal principal) voidhandleRealmEvent(org.wildfly.security.auth.server.event.RealmEvent event) voidRemoves all cached identities from the cache.voidremoveFromCache(Principal principal) Removes aRealmIdentityreferenced by the specifiedPrincipalfrom the cache.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.security.auth.server.SecurityRealm
getCredentialAcquireSupport, getRealmIdentity, getRealmIdentity
-
Constructor Details
-
CachingSecurityRealm
public CachingSecurityRealm(org.wildfly.security.auth.server.SecurityRealm realm, org.wildfly.security.cache.RealmIdentityCache cache) Creates a new instance.- Parameters:
realm- theSecurityRealmwhoseRealmIdentityshould be cached.cache- theRealmIdentityCacheinstance
-
CachingSecurityRealm
public CachingSecurityRealm(org.wildfly.security.auth.server.SecurityRealm realm, org.wildfly.security.cache.RealmIdentityCache cache, Supplier<Provider[]> providerSupplier) Creates a new instance.- Parameters:
realm- theSecurityRealmwhoseRealmIdentityshould be cached.cache- theRealmIdentityCacheinstanceproviderSupplier- the provider supplier to use for verification purposes (must not benull)
-
-
Method Details
-
getRealmIdentity
public org.wildfly.security.auth.server.RealmIdentity getRealmIdentity(Principal principal) throws org.wildfly.security.auth.server.RealmUnavailableException - Specified by:
getRealmIdentityin interfaceorg.wildfly.security.auth.server.SecurityRealm- Throws:
org.wildfly.security.auth.server.RealmUnavailableException
-
getCredentialAcquireSupport
public org.wildfly.security.auth.SupportLevel getCredentialAcquireSupport(Class<? extends org.wildfly.security.credential.Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec) throws org.wildfly.security.auth.server.RealmUnavailableException - Specified by:
getCredentialAcquireSupportin interfaceorg.wildfly.security.auth.server.SecurityRealm- Throws:
org.wildfly.security.auth.server.RealmUnavailableException
-
getEvidenceVerifySupport
public org.wildfly.security.auth.SupportLevel getEvidenceVerifySupport(Class<? extends org.wildfly.security.evidence.Evidence> evidenceType, String algorithmName) throws org.wildfly.security.auth.server.RealmUnavailableException - Specified by:
getEvidenceVerifySupportin interfaceorg.wildfly.security.auth.server.SecurityRealm- Throws:
org.wildfly.security.auth.server.RealmUnavailableException
-
handleRealmEvent
public void handleRealmEvent(org.wildfly.security.auth.server.event.RealmEvent event) - Specified by:
handleRealmEventin interfaceorg.wildfly.security.auth.server.SecurityRealm
-
removeFromCache
-
removeAllFromCache
public void removeAllFromCache()Removes all cached identities from the cache. -
getCacheableRealm
protected org.wildfly.security.auth.server.SecurityRealm getCacheableRealm()Gets wrapped backing realm.- Returns:
- the wrapped backing realm
-