Picketbox Infinispan 4.0.14.Final-redhat-2

org.jboss.security.authentication
Class JBossCachedAuthenticationManager

java.lang.Object
  extended by org.jboss.security.authentication.JBossCachedAuthenticationManager
All Implemented Interfaces:
AuthenticationManager, BaseSecurityManager, CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>

public class JBossCachedAuthenticationManager
extends Object
implements AuthenticationManager, CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>

AuthenticationManager implementation that uses CacheableManager as the cache provider.

Author:
Marcus Moyses, Oleg Nitz, Scott.Stark@jboss.org, Anil.Saldhana@jboss.org

Nested Class Summary
static class JBossCachedAuthenticationManager.DomainInfo
          A cache value.
 
Field Summary
protected  ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> domainCache
           
 
Constructor Summary
JBossCachedAuthenticationManager()
          Create a new JBossCachedAuthenticationManager using the default security domain and CallbackHandler implementation.
JBossCachedAuthenticationManager(String securityDomain, CallbackHandler callbackHandler)
          Create a new JBossCachedAuthenticationManager.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

domainCache

protected ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> domainCache
Constructor Detail

JBossCachedAuthenticationManager

public JBossCachedAuthenticationManager()
Create a new JBossCachedAuthenticationManager using the default security domain and CallbackHandler implementation.


JBossCachedAuthenticationManager

public JBossCachedAuthenticationManager(String securityDomain,
                                        CallbackHandler callbackHandler)
Create a new JBossCachedAuthenticationManager.

Parameters:
securityDomain - name of the security domain
callbackHandler - CallbackHandler implementation
Method Detail

getActiveSubject

public Subject getActiveSubject()
Specified by:
getActiveSubject in interface AuthenticationManager

getTargetPrincipal

public Principal getTargetPrincipal(Principal anotherDomainPrincipal,
                                    Map<String,Object> contextMap)
Specified by:
getTargetPrincipal in interface AuthenticationManager

isValid

public boolean isValid(Principal principal,
                       Object credential)
Specified by:
isValid in interface AuthenticationManager

isValid

public boolean isValid(Principal principal,
                       Object credential,
                       Subject activeSubject)
Specified by:
isValid in interface AuthenticationManager

getSecurityDomain

public String getSecurityDomain()
Specified by:
getSecurityDomain in interface BaseSecurityManager

flushCache

public void flushCache()
Specified by:
flushCache in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>

flushCache

public void flushCache(Principal key)
Specified by:
flushCache in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>

setCache

public void setCache(ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo> cache)
Specified by:
setCache in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>

containsKey

public boolean containsKey(Principal key)
Specified by:
containsKey in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>

getCachedKeys

public Set<Principal> getCachedKeys()
Specified by:
getCachedKeys in interface CacheableManager<ConcurrentMap<Principal,JBossCachedAuthenticationManager.DomainInfo>,Principal>

setDeepCopySubjectOption

public void setDeepCopySubjectOption(Boolean flag)
Flag to specify if deep copy of subject sets needs to be enabled

Parameters:
flag -

Picketbox Infinispan 4.0.14.Final-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.