com.infoengine.tomcat.request
Class InfoEngineRealm

java.lang.Object
  extended byBaseInterceptor
      extended bycom.infoengine.tomcat.request.InfoEngineRealm

public class InfoEngineRealm
extends BaseInterceptor

Realm based upon execution of Info*Engine tasks.

See Also:
Serialized Form

Nested Class Summary
private  class InfoEngineRealm.CacheEntry
           
 
Field Summary
private  String authTaskUri
           
private  long cacheTTL
           
private  ContextManager cm
           
private static long DEFAULT_TTL
           
private  String queryUserRolesTaskUri
           
private  int reqRolesNote
           
private static Hashtable roleCache
           
private static Hashtable userCache
           
 
Constructor Summary
InfoEngineRealm()
           
 
Method Summary
 int authenticate(Request req, Response response)
           
 int authorize(Request req, Response response, String[] roles)
           
 boolean checkPassword(String user, String pass)
           
 void contextInit(Context ctx)
           
 String[] getUserRoles(String user)
           
 void setAuthTaskUri(String uri)
          Set the URI of the authentication task.
 void setCacheTimeToLive(String ttl)
          Set the time to live for internal cache entries.
 void setContextManager(ContextManager cm)
          Set the context manager.
 void setQueryUserRolesTaskUri(String uri)
          Set the URI of the user role querying task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_TTL

private static final long DEFAULT_TTL
See Also:
Constant Field Values

authTaskUri

private String authTaskUri

cacheTTL

private long cacheTTL

cm

private ContextManager cm

queryUserRolesTaskUri

private String queryUserRolesTaskUri

reqRolesNote

private int reqRolesNote

roleCache

private static Hashtable roleCache

userCache

private static Hashtable userCache
Constructor Detail

InfoEngineRealm

public InfoEngineRealm()
Method Detail

setAuthTaskUri

public void setAuthTaskUri(String uri)
Set the URI of the authentication task.

Parameters:
uri - The URI of the authentication task.

setQueryUserRolesTaskUri

public void setQueryUserRolesTaskUri(String uri)
Set the URI of the user role querying task.

Parameters:
uri - The URI of the user role querying task.

setCacheTimeToLive

public void setCacheTimeToLive(String ttl)
Set the time to live for internal cache entries.

Parameters:
ttl - The time to live value, in seconds

setContextManager

public void setContextManager(ContextManager cm)
Set the context manager. To keep it simple we don't support dynamic add/remove for this interceptor.


contextInit

public void contextInit(Context ctx)
                 throws TomcatException
Throws:
TomcatException

authenticate

public int authenticate(Request req,
                        Response response)

authorize

public int authorize(Request req,
                     Response response,
                     String[] roles)

checkPassword

public boolean checkPassword(String user,
                             String pass)

getUserRoles

public String[] getUserRoles(String user)