mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
Update HttpSessionListenerAdapter.java
This commit is contained in:
parent
00e8f95582
commit
aa2380e090
@ -54,13 +54,17 @@ public class HttpSessionListenerAdapter implements HttpSessionListener {
|
|||||||
HttpSession session = sessionEvent.getSession();
|
HttpSession session = sessionEvent.getSession();
|
||||||
Authentication authentication = (Authentication ) session.getAttribute(WebConstants.AUTHENTICATION);
|
Authentication authentication = (Authentication ) session.getAttribute(WebConstants.AUTHENTICATION);
|
||||||
SignPrincipal principal = AuthorizationUtils.getPrincipal(authentication);
|
SignPrincipal principal = AuthorizationUtils.getPrincipal(authentication);
|
||||||
if(principal != null ) {
|
if(principal != null && principal.getUserInfo() !=null) {
|
||||||
_logger.trace("{} HttpSession Id {} for userId {} , username {} @Ticket {} Destroyed" ,
|
_logger.debug("{} HttpSession Id {} for userId {} , username {} @Ticket {} Destroyed" ,
|
||||||
DateUtils.formatDateTime(new Date()),
|
DateUtils.formatDateTime(new Date()),
|
||||||
session.getId(),
|
session.getId(),
|
||||||
principal.getUserInfo().getId(),
|
principal.getUserInfo().getId(),
|
||||||
principal.getUserInfo().getUsername(),
|
principal.getUserInfo().getUsername(),
|
||||||
principal.getSession().getId());
|
principal.getSession().getId());
|
||||||
|
}else {
|
||||||
|
_logger.trace("{} HttpSession Id {} Destroyed" ,
|
||||||
|
DateUtils.formatDateTime(new Date()),
|
||||||
|
session.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user