|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.groiss.org.AuthUtil
public class AuthUtil
Utilities for writing an authorization class.
Constructor Summary | |
---|---|
AuthUtil()
|
Method Summary | |
---|---|
static java.lang.String |
authorizeBrowser(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
User u)
This function can be called from the client to instantiate a session. |
static void |
authorizeBrowser(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
User u,
java.lang.String nextUrl)
This function can be called from the client to instantiate a session and send the session cookie to the browser. |
static void |
checkSysadmPasswd(java.lang.String passwd)
|
static java.security.Principal |
checkUser(java.lang.String userId,
java.lang.String passwd,
java.lang.String clientAddr)
Checks the user. |
static java.security.Principal |
checkUser(java.lang.String userId,
java.lang.String passwd,
java.lang.String clientAddr,
boolean ignoreUnsuccessfulLogin)
Checks the user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthUtil()
Method Detail |
---|
public static java.lang.String authorizeBrowser(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, User u) throws java.io.IOException
req
- the HttpServletRequestres
- the HttpServletResponseu
- the user
java.io.IOException
public static void authorizeBrowser(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, User u, java.lang.String nextUrl) throws java.io.IOException
req
- the HttpServletRequestres
- the HttpServletResponseu
- the usernextUrl
- the url for redirection
java.io.IOException
public static java.security.Principal checkUser(java.lang.String userId, java.lang.String passwd, java.lang.String clientAddr) throws java.lang.Exception
userId
- the id of the userpasswd
- the passwdclientAddr
- the ip address of the client
java.lang.Exception
public static java.security.Principal checkUser(java.lang.String userId, java.lang.String passwd, java.lang.String clientAddr, boolean ignoreUnsuccessfulLogin) throws java.lang.Exception
userId
- the id of the userpasswd
- the passwdclientAddr
- the ip address of the clientignoreUnsuccessfulLogin
- if true unsuccessful logins will not be recorded
java.lang.Exception
public static void checkSysadmPasswd(java.lang.String passwd)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |