org.jboss.security.authentication
public class JBossCachedAuthenticationManager extends Object implements AuthenticationManager, CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
AuthenticationManager
implementation that uses CacheableManager
as the cache provider.Modifier and Type | Class and Description |
---|---|
static class |
JBossCachedAuthenticationManager.CompoundInfo |
static class |
JBossCachedAuthenticationManager.DomainInfo
A cache value.
|
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> |
domainCache |
protected ThreadLocal<JBossCachedAuthenticationManager.CompoundInfo> |
validatedDomainInfo |
Constructor and Description |
---|
JBossCachedAuthenticationManager()
Create a new JBossCachedAuthenticationManager using the
default security domain and
CallbackHandler implementation. |
JBossCachedAuthenticationManager(String securityDomain,
CallbackHandler callbackHandler)
Create a new JBossCachedAuthenticationManager.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsKey(Principal key) |
void |
flushCache() |
void |
flushCache(Principal key) |
Subject |
getActiveSubject() |
Set<Principal> |
getCachedKeys() |
String |
getSecurityDomain() |
Principal |
getTargetPrincipal(Principal anotherDomainPrincipal,
Map<String,Object> contextMap) |
boolean |
isValid(Principal principal,
Object credential) |
boolean |
isValid(Principal principal,
Object credential,
Subject activeSubject) |
void |
releaseModuleEntries(ClassLoader classLoader)
Release cache entries got the specified ClassLoader.
|
void |
setCache(ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> cache) |
void |
setDeepCopySubjectOption(Boolean flag)
Flag to specify if deep copy of subject sets needs to be
enabled
|
protected ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> domainCache
protected ThreadLocal<JBossCachedAuthenticationManager.CompoundInfo> validatedDomainInfo
public JBossCachedAuthenticationManager()
CallbackHandler
implementation.public JBossCachedAuthenticationManager(String securityDomain, CallbackHandler callbackHandler)
securityDomain
- name of the security domaincallbackHandler
- CallbackHandler
implementationpublic Subject getActiveSubject()
getActiveSubject
in interface AuthenticationManager
public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map<String,Object> contextMap)
getTargetPrincipal
in interface AuthenticationManager
public boolean isValid(Principal principal, Object credential)
isValid
in interface AuthenticationManager
public boolean isValid(Principal principal, Object credential, Subject activeSubject)
isValid
in interface AuthenticationManager
public String getSecurityDomain()
getSecurityDomain
in interface BaseSecurityManager
public void flushCache()
flushCache
in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public void flushCache(Principal key)
flushCache
in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public void setCache(ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> cache)
setCache
in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public boolean containsKey(Principal key)
containsKey
in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public Set<Principal> getCachedKeys()
getCachedKeys
in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public void setDeepCopySubjectOption(Boolean flag)
flag
- public void releaseModuleEntries(ClassLoader classLoader)
classLoader
- the ClassLoader.Copyright © 2015 JBoss by Red Hat. All Rights Reserved.