Update HistorySignOnAppInterceptor.java

This commit is contained in:
MaxKey
2024-07-18 22:31:07 +08:00
parent 3f96dee6b6
commit b8de11dfbc

View File

@@ -17,6 +17,8 @@
package org.dromara.maxkey.web.interceptor;
import java.util.Date;
import org.dromara.maxkey.authn.SignPrincipal;
import org.dromara.maxkey.authn.web.AuthorizationUtils;
import org.dromara.maxkey.entity.HistoryLoginApps;
@@ -73,6 +75,7 @@ public class HistorySignOnAppInterceptor implements AsyncHandlerInterceptor {
historyLoginApps.setUsername(userInfo.getUsername());
historyLoginApps.setDisplayName(userInfo.getDisplayName());
historyLoginApps.setInstId(userInfo.getInstId());
historyLoginApps.setLoginTime(new Date());
historyLoginAppsService.insert(historyLoginApps);
WebContext.removeAttribute(WebConstants.CURRENT_SINGLESIGNON_URI);
WebContext.removeAttribute(WebConstants.SINGLE_SIGN_ON_APP_ID);