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 SecurityRealm and its identities.

Author:
Pedro Igor
  • Field Summary

    Fields inherited from interface org.wildfly.security.auth.server.SecurityRealm

    EMPTY_REALM
  • 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

    Modifier and Type
    Method
    Description
    protected org.wildfly.security.auth.realm.CacheableSecurityRealm
    Gets wrapped backing realm.
    org.wildfly.security.auth.SupportLevel
    getCredentialAcquireSupport(Class<? extends org.wildfly.security.credential.Credential> credentialType, String algorithmName, AlgorithmParameterSpec parameterSpec)
     
    org.wildfly.security.auth.SupportLevel
    getEvidenceVerifySupport(Class<? extends org.wildfly.security.evidence.Evidence> evidenceType, String algorithmName)
     
    org.wildfly.security.auth.server.RealmIdentity
     
    void
    handleRealmEvent(org.wildfly.security.auth.server.event.RealmEvent event)
     
    void
    Removes all cached identities from the cache.
    void
    Removes a RealmIdentity referenced by the specified Principal from the cache.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.wildfly.security.auth.server.SecurityRealm

    getCredentialAcquireSupport, getRealmIdentity, getRealmIdentity
  • Constructor Details

    • CachingSecurityRealm

      public CachingSecurityRealm(org.wildfly.security.auth.realm.CacheableSecurityRealm realm, org.wildfly.security.cache.RealmIdentityCache cache)
      Creates a new instance.
      Parameters:
      realm - the SecurityRealm whose RealmIdentity should be cached.
      cache - the RealmIdentityCache instance
  • Method Details

    • getRealmIdentity

      public org.wildfly.security.auth.server.RealmIdentity getRealmIdentity(Principal principal) throws org.wildfly.security.auth.server.RealmUnavailableException
      Specified by:
      getRealmIdentity in interface org.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:
      getCredentialAcquireSupport in interface org.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:
      getEvidenceVerifySupport in interface org.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:
      handleRealmEvent in interface org.wildfly.security.auth.server.SecurityRealm
    • removeFromCache

      public void removeFromCache(Principal principal)
      Removes a RealmIdentity referenced by the specified Principal from the cache.
      Parameters:
      principal - the Principal that 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