public class AuthUtil
extends java.lang.Object
Constructor and Description |
---|
AuthUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addNodeCookie(javax.servlet.http.HttpServletResponse res,
com.groiss.server.RunningNode rn) |
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.
|
static void |
deleteNodeCookie(javax.servlet.http.HttpServletResponse res) |
static java.lang.String |
getNodeCookieName() |
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 userjava.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
When referer check is enabled (ep.check.http.referer), nextUrl must be also be in ep.check.http.referer.exempt).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 clientjava.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 recordedjava.lang.Exception
public static void checkSysadmPasswd(java.lang.String passwd)
public static java.lang.String getNodeCookieName()
public static void addNodeCookie(javax.servlet.http.HttpServletResponse res, com.groiss.server.RunningNode rn)
public static void deleteNodeCookie(javax.servlet.http.HttpServletResponse res)
@enterprise 9.0.33982 Copyright © 2001-2023 Groiss Informatics GmbH. All Rights Reserved.