类 AuthServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
com.sh.wf.servlet.SHServletBase
com.sh.system.servlet.AuthServlet
- 所有已实现的接口:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
Description: 授权逻辑
Title:首亨软件 - 聚天平台
- 从以下版本开始:
- 2018年11月13日
- 另请参阅:
-
字段概要
字段从类继承的字段 com.sh.wf.servlet.SHServletBase
AUTH_LOGIN, AUTH_LOGIN_IGNORE, ERROR, FAILURE, IFRAME_FORWARD, log4j, MESSAGE, SUCCESS从类继承的字段 jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voiddoPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) intisAuth()是否进行登陆权限验证protected booleanisAuthentication(SHServletContext context) 判断用户名和密码是否正确,不正确则开始设置记数器;protected booleanisUserExist(SHServletContext context, DataCenter dc, String userId) 判定用户名是否存在voidreturnForward(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String forward, String msgType, String msgStr) voidreturnForward(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String forward, String msgType, String msgStr, UserInfo userInfo) 页面返回值判断,主要是处理当通过ajax请求登陆验证时用从类继承的方法 com.sh.wf.servlet.SHServletBase
dc, dc, doOptions, getParameterValue, getParameterValues, getRequestFile, getRequestFileName, getRequestFileNames, getRequestFiles, isWriteLog, request, response, service, session, setRequestValue, userInfo从类继承的方法 jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doPut, doTrace, getLastModified, init, service从类继承的方法 jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
字段详细资料
-
LOGIN_USER_NOT_EXISTS
-
LOGIN_PWD_ERROR
-
-
构造器详细资料
-
AuthServlet
public AuthServlet()
-
-
方法详细资料
-
doPost
protected void doPost(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws jakarta.servlet.ServletException, IOException - 覆盖:
doPost在类中jakarta.servlet.http.HttpServlet- 抛出:
jakarta.servlet.ServletExceptionIOException
-
returnForward
-
returnForward
public void returnForward(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, String forward, String msgType, String msgStr, UserInfo userInfo) 页面返回值判断,主要是处理当通过ajax请求登陆验证时用- 参数:
request- HttpServletRequestresponse- HttpServletResponseforward- StringmsgType- StringmsgStr- StringuserInfo- UserInfo
-
isUserExist
protected boolean isUserExist(SHServletContext context, DataCenter dc, String userId) throws Exception 判定用户名是否存在- 参数:
userId- String 用户名- 返回:
- boolean true存在;false不存在
- 抛出:
Exception
-
isAuthentication
判断用户名和密码是否正确,不正确则开始设置记数器;- 参数:
context- SHServletContext- 返回:
- true正确,false不正确
- 抛出:
Exception
-
isAuth
public int isAuth()从类复制的说明:SHServletBase是否进行登陆权限验证- 覆盖:
isAuth在类中SHServletBase- 返回:
- AUTH_LOGIN | AUTH_LOGIN_IGNORE
-