com.infoengine.tomcat.request
Class InfoEngineRealm
java.lang.Object
BaseInterceptor
com.infoengine.tomcat.request.InfoEngineRealm
- public class InfoEngineRealm
- extends BaseInterceptor
Realm based upon execution of Info*Engine tasks.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
InfoEngineRealm
public InfoEngineRealm()
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)