| 程序包 | 说明 |
|---|---|
| cool.mtc.security | |
| cool.mtc.security.handler.auth | |
| cool.mtc.security.plugin.jwt | |
| cool.mtc.security.service | |
| cool.mtc.security.service.impl |
| 限定符和类型 | 方法和说明 |
|---|---|
default UserDetailsSupport |
SecuritySupport.currentUser() |
| 限定符和类型 | 方法和说明 |
|---|---|
UserDetailsSupport |
AuthSuccessHandler.success(org.springframework.security.core.Authentication authentication) |
UserDetailsSupport |
AuthSuccessHandler.success(org.springframework.security.core.Authentication authentication,
boolean createToken) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
AuthSuccessHandler.createTokenAddToAllowListAndResponse(UserDetailsSupport user)
创建token放入白名单中且加入响应头中
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
JwtTemplate.generate(UserDetailsSupport user) |
| 限定符和类型 | 方法和说明 |
|---|---|
UserDetailsSupport |
SecurityService.loadByCustomForm(CustomAuthFormSupport form)
自定义方式登录时登录验证方法
此方法应验证是否登录成功,并且保证返回不为空的UserDetails
|
UserDetailsSupport |
SecurityService.loadByUserIdAndOrgIdAndAuthType(Object userId,
Object orgId,
String authType) |
UserDetailsSupport |
SecurityService.loadByUsernameAndAuthType(String username,
String authType) |
| 限定符和类型 | 方法和说明 |
|---|---|
default void |
SecurityService.authSuccess(UserDetailsSupport userSupport)
认证成功之后调用的方法
此方法在响应客户端请求后执行
|
default void |
SecurityService.logoutSuccess(UserDetailsSupport userSupport)
登出成功之后
此方法在响应客户端请求后执行
|
void |
SecurityService.saveTokenToAllowList(String token,
UserDetailsSupport userSupport) |
| 限定符和类型 | 方法和说明 |
|---|---|
UserDetailsSupport |
DefaultSecurityServiceImpl.loadByCustomForm(CustomAuthFormSupport form) |
UserDetailsSupport |
DefaultSecurityServiceImpl.loadByUserIdAndOrgIdAndAuthType(Object userId,
Object orgId,
String authType) |
UserDetailsSupport |
DefaultSecurityServiceImpl.loadByUsernameAndAuthType(String username,
String authType) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
DefaultSecurityServiceImpl.saveTokenToAllowList(String token,
UserDetailsSupport user) |
Copyright © 2023. All rights reserved.