Class 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
    • Constructor Detail

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

      • 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