com.caucho.security
Class MemorySingleSignon

java.lang.Object
  extended by com.caucho.security.MemorySingleSignon
All Implemented Interfaces:
SingleSignon

@Service
public class MemorySingleSignon
extends java.lang.Object
implements SingleSignon

Memory-based cache for single-signon.

Since:
Resin 4.0.0

Constructor Summary
MemorySingleSignon()
           
 
Method Summary
 java.security.Principal get(java.lang.String id)
          Returns any saved single signon entry.
 int getCacheSize()
          Returns the size of the principal cache.
 void init()
          Initialize the single signon.
 void put(java.lang.String id, java.security.Principal user)
          Adds a principal to the cache
 boolean remove(java.lang.String id)
          Adds a principal to the cache
 void setCacheSize(int size)
          Sets the size of the principal cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemorySingleSignon

public MemorySingleSignon()
Method Detail

getCacheSize

public int getCacheSize()
Returns the size of the principal cache.


setCacheSize

public void setCacheSize(int size)
Sets the size of the principal cache.


init

@PostConstruct
public void init()
Initialize the single signon.


get

public java.security.Principal get(java.lang.String id)
Returns any saved single signon entry.

Specified by:
get in interface SingleSignon

put

public void put(java.lang.String id,
                java.security.Principal user)
Adds a principal to the cache

Specified by:
put in interface SingleSignon

remove

public boolean remove(java.lang.String id)
Adds a principal to the cache

Specified by:
remove in interface SingleSignon
Returns:
the logged in principal on success, null on failure.