org.wamblee.glassfish.auth.cache.impl
Class NoAuthenticationCache

java.lang.Object
  extended by org.wamblee.glassfish.auth.cache.impl.NoAuthenticationCache
All Implemented Interfaces:
AuthenticationCache

public class NoAuthenticationCache
extends java.lang.Object
implements AuthenticationCache

Authentication cache which does not cache.

Author:
Erik Brakkee

Constructor Summary
NoAuthenticationCache(java.util.Properties aProperties)
           
 
Method Summary
 java.util.List<java.lang.String> getGroups(java.lang.String aUsername)
          Gets the groups a user belongs to from the cache.
 java.lang.String getPassword(java.lang.String aUsername)
          Gets the cached password for a given user.
 java.lang.String getSeed(java.lang.String aUsername)
          Gets a cached seed for a given username based on the configured sql seed query.
 void setGroups(java.lang.String aUsername, java.util.List<java.lang.String> aGroups)
          Sets the groups for a given user.
 void setPassword(java.lang.String aUserName, java.lang.String aPassword)
          Sets the cached password for a user.
 void setSeed(java.lang.String aUsername, java.lang.String aSeed)
          Sets the seed.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NoAuthenticationCache

public NoAuthenticationCache(java.util.Properties aProperties)
Method Detail

getPassword

public java.lang.String getPassword(java.lang.String aUsername)
Description copied from interface: AuthenticationCache
Gets the cached password for a given user.

Specified by:
getPassword in interface AuthenticationCache
Parameters:
aUsername - Username.
Returns:
Password or null if no cached value is available.

setPassword

public void setPassword(java.lang.String aUserName,
                        java.lang.String aPassword)
Description copied from interface: AuthenticationCache
Sets the cached password for a user.

Specified by:
setPassword in interface AuthenticationCache
Parameters:
aUserName - Username.
aPassword - Password.

getGroups

public java.util.List<java.lang.String> getGroups(java.lang.String aUsername)
Description copied from interface: AuthenticationCache
Gets the groups a user belongs to from the cache.

Specified by:
getGroups in interface AuthenticationCache
Parameters:
aUsername - User.
Returns:
Groups. Returns a (possibly) empty list of cached groups or null of no cached groups are found.

setGroups

public void setGroups(java.lang.String aUsername,
                      java.util.List<java.lang.String> aGroups)
Description copied from interface: AuthenticationCache
Sets the groups for a given user.

Specified by:
setGroups in interface AuthenticationCache
Parameters:
aUsername - User name.
aGroups - Groups (must be non-null).

getSeed

public java.lang.String getSeed(java.lang.String aUsername)
Description copied from interface: AuthenticationCache
Gets a cached seed for a given username based on the configured sql seed query.

Specified by:
getSeed in interface AuthenticationCache
Parameters:
aUsername - Username.
Returns:
The seed found or the empty string if no seeds or multiple seeds were found. Returns null in case no cached seed is available.

setSeed

public void setSeed(java.lang.String aUsername,
                    java.lang.String aSeed)
Description copied from interface: AuthenticationCache
Sets the seed.

Specified by:
setSeed in interface AuthenticationCache
Parameters:
aUsername - Username.
aSeed - Seed (may not be null).

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2021. All Rights Reserved.