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