类 HttpServletAuthService
java.lang.Object
club.zhcs.lina.auth.service.HttpServletAuthService
- 所有已实现的接口:
AuthService
- 直接已知子类:
DefaultAuthService
- 作者:
- Kerbores(kerbores @ riemann.tech)
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void添加cookiebooleanauthentication(List<String> withoutAuthenticationUrlRegulars) 认证检查认证头keycookie 设置abstract javax.servlet.http.HttpServletRequestabstract javax.servlet.http.HttpServletResponseabstract JWTGenerator用户登录voidlogout()登出boolean获取 refresh tokenrefreshToken(String subject) 生成refreshTokenrefresh token key ,可以接受从header/cookie和请求参数传入booleanskip()是否跳过检查根据token获取subject信息token()获取token生成tokentokenKey()token key ,可以接受从header/cookie和请求参数传入tryRefreshToken(String refreshToken) user()获取当前登录用户abstract UserDetailServiceuserName()获取用户名从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 club.zhcs.lina.auth.service.AuthService
permissions, roles
-
构造器详细资料
-
HttpServletAuthService
public HttpServletAuthService()
-
-
方法详细资料
-
getRequest
public abstract javax.servlet.http.HttpServletRequest getRequest() -
getResponse
public abstract javax.servlet.http.HttpServletResponse getResponse() -
userDetailService
-
jwtGenerator
-
cookieSettings
cookie 设置- 返回:
- CookieSettings
-
subject
从接口复制的说明:AuthService根据token获取subject信息- 指定者:
subject在接口中AuthService- 参数:
token- token- 返回:
- subject
-
token
从接口复制的说明:AuthService生成token- 指定者:
token在接口中AuthService- 参数:
subject- subject- 返回:
- token
-
refreshToken
从接口复制的说明:AuthService生成refreshToken- 指定者:
refreshToken在接口中AuthService- 参数:
subject- subject- 返回:
- refreshToken
-
login
用户登录- 指定者:
login在接口中AuthService- 参数:
user- 用户
-
logout
public void logout()登出- 指定者:
logout在接口中AuthService
-
user
获取当前登录用户- 指定者:
user在接口中AuthService- 返回:
- AuthUser
-
userName
从接口复制的说明:AuthService获取用户名- 指定者:
userName在接口中AuthService- 返回:
- userName
-
tryRefreshToken
- 参数:
refreshToken- refreshToken- 返回:
- AuthUser
-
addCookie
添加cookie- 参数:
name- 名称value- 值age- 有效期(分钟)
-
authentication
认证检查- 指定者:
authentication在接口中AuthService- 参数:
withoutAuthenticationUrlRegulars- 不需要检查的url正则表达式- 返回:
- 认证检查通过状态
-
pass
- 参数:
uri- 请求地址withoutAuthenticationUrlRegulars- 放行url正则- 返回:
- 是否放行
-
skip
public boolean skip()是否跳过检查- 返回:
- 是否跳过检查
-
authorizationHeaderKey
认证头key- 返回:
- 认证头key
-
tokenKey
token key ,可以接受从header/cookie和请求参数传入- 返回:
- token key
-
refreshTokenKey
refresh token key ,可以接受从header/cookie和请求参数传入- 返回:
- refresh token key
-
token
获取token- 指定者:
token在接口中AuthService- 返回:
- token
-
refreshToken
获取 refresh token- 指定者:
refreshToken在接口中AuthService- 返回:
- refreshToken
-