refactor: 优化后台登出的逻辑
This commit is contained in:
parent
1af9a3d173
commit
41b5a18a8b
|
@ -33,6 +33,9 @@ public class SSOLogoutService {
|
||||||
*/
|
*/
|
||||||
public void logout(String sessionId, HttpServletResponse response) throws Exception {
|
public void logout(String sessionId, HttpServletResponse response) throws Exception {
|
||||||
Object obj = redisIndexedSessionRepository.findById(sessionId);
|
Object obj = redisIndexedSessionRepository.findById(sessionId);
|
||||||
|
if (obj == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String authId = (String) MethodUtils.invokeMethod(obj, "getAttribute", "authId");
|
String authId = (String) MethodUtils.invokeMethod(obj, "getAttribute", "authId");
|
||||||
AuthSource authSource = authSourceMapper.selectByPrimaryKey(authId);
|
AuthSource authSource = authSourceMapper.selectByPrimaryKey(authId);
|
||||||
if (authSource != null) {
|
if (authSource != null) {
|
||||||
|
|
Loading…
Reference in New Issue