public class AuthUtil extends Object
Constructor and Description |
---|
AuthUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addNodeCookie(HttpServletResponse res,
String rn) |
static String |
authorizeBrowser(HttpServletRequest req,
HttpServletResponse res,
User u)
This function can be called from the client to instantiate a session.
|
static void |
authorizeBrowser(HttpServletRequest req,
HttpServletResponse res,
User u,
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(String passwd) |
static Principal |
checkUser(String userId,
String passwd,
String clientAddr)
Checks the user.
|
static Principal |
checkUser(String userId,
String passwd,
String clientAddr,
boolean ignoreUnsuccessfulLogin)
Checks the user.
|
static void |
deleteNodeCookie(HttpServletResponse res) |
static boolean |
equalUserIds(String firstId,
String secondId)
Checks if both id strings are equal respecting the configuration value for case sensitive user Id checking
|
static String |
getNodeCookieName() |
public static String authorizeBrowser(HttpServletRequest req, HttpServletResponse res, User u) throws IOException
req
- the HttpServletRequestres
- the HttpServletResponseu
- the userIOException
public static void authorizeBrowser(HttpServletRequest req, HttpServletResponse res, User u, String nextUrl) throws IOException
req
- the HttpServletRequestres
- the HttpServletResponseu
- the usernextUrl
- the url for redirection
When referer check is enabled (ep.check.http.referer), nextUrl must be also be in ep.check.http.referer.exempt).IOException
public static Principal checkUser(String userId, String passwd, String clientAddr) throws Exception
userId
- the id of the userpasswd
- the passwdclientAddr
- the ip address of the clientException
public static Principal checkUser(String userId, String passwd, String clientAddr, boolean ignoreUnsuccessfulLogin) throws Exception
userId
- the id of the userpasswd
- the passwdclientAddr
- the ip address of the clientignoreUnsuccessfulLogin
- if true unsuccessful logins will not be recordedException
public static void checkSysadmPasswd(String passwd)
public static boolean equalUserIds(String firstId, String secondId)
firstId
- a user Id stringsecondId
- a user Id string to compare with firstIdpublic static String getNodeCookieName()
public static void addNodeCookie(HttpServletResponse res, String rn)
public static void deleteNodeCookie(HttpServletResponse res)
@enterprise 10.0.39049 Copyright © 2024 FREQUENTIS AG. All Rights Reserved.