public class JBossCachedAuthenticationManager extends Object implements org.jboss.security.AuthenticationManager, org.jboss.security.CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
AuthenticationManager
implementation that uses Cache
as the cache provider.Modifier and Type | Class and Description |
---|---|
static class |
JBossCachedAuthenticationManager.DomainInfo
A cache value.
|
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> |
domainCache |
protected Logger |
log |
protected boolean |
trace |
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 |
setCache(ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> cache) |
void |
setDeepCopySubjectOption(Boolean flag)
Flag to specify if deep copy of subject sets needs to be
enabled
|
protected Logger log
protected boolean trace
protected ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> domainCache
public JBossCachedAuthenticationManager()
CallbackHandler
implementation.public JBossCachedAuthenticationManager(String securityDomain, CallbackHandler callbackHandler)
securityDomain
- name of the security domaincallbackHandler
- CallbackHandler
implementationpublic Subject getActiveSubject()
getActiveSubject
in interface org.jboss.security.AuthenticationManager
public Principal getTargetPrincipal(Principal anotherDomainPrincipal, Map<String,Object> contextMap)
getTargetPrincipal
in interface org.jboss.security.AuthenticationManager
public boolean isValid(Principal principal, Object credential)
isValid
in interface org.jboss.security.AuthenticationManager
public boolean isValid(Principal principal, Object credential, Subject activeSubject)
isValid
in interface org.jboss.security.AuthenticationManager
public String getSecurityDomain()
getSecurityDomain
in interface org.jboss.security.BaseSecurityManager
public void flushCache()
flushCache
in interface org.jboss.security.CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public void flushCache(Principal key)
flushCache
in interface org.jboss.security.CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public void setCache(ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> cache)
setCache
in interface org.jboss.security.CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public boolean containsKey(Principal key)
containsKey
in interface org.jboss.security.CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public Set<Principal> getCachedKeys()
getCachedKeys
in interface org.jboss.security.CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>
public void setDeepCopySubjectOption(Boolean flag)
flag
- Copyright © 2012 JBoss by Red Hat. All Rights Reserved.