Class CachingSecurityRealm
- java.lang.Object
-
- org.infinispan.server.security.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
SecurityRealmand its identities.- Author:
- Pedro Igor
-
-
Constructor Summary
Constructors Constructor Description CachingSecurityRealm(org.wildfly.security.auth.realm.CacheableSecurityRealm realm, org.wildfly.security.cache.RealmIdentityCache cache)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.wildfly.security.auth.realm.CacheableSecurityRealmgetCacheableRealm()Gets 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)voidremoveAllFromCache()Removes all cached identities from the cache.voidremoveFromCache(Principal principal)Removes aRealmIdentityreferenced by the specifiedPrincipalfrom the cache.
-
-
-
Constructor Detail
-
CachingSecurityRealm
public CachingSecurityRealm(org.wildfly.security.auth.realm.CacheableSecurityRealm realm, org.wildfly.security.cache.RealmIdentityCache cache)Creates a new instance.- Parameters:
realm- theSecurityRealmwhoseRealmIdentityshould be cached.cache- theRealmIdentityCacheinstance
-
-
Method Detail
-
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
public void removeFromCache(Principal principal)
Removes aRealmIdentityreferenced by the specifiedPrincipalfrom the cache.- Parameters:
principal- thePrincipalthat references a previously cached realm identity
-
removeAllFromCache
public void removeAllFromCache()
Removes all cached identities from the cache.
-
getCacheableRealm
protected org.wildfly.security.auth.realm.CacheableSecurityRealm getCacheableRealm()
Gets wrapped backing realm.- Returns:
- the wrapped backing realm
-
-