优化判断逻辑

This commit is contained in:
zlt2000
2021-08-31 22:20:25 +08:00
parent 2e7161ed48
commit cf5f4e1ff5
@@ -113,6 +113,7 @@ public class AuthUtils {
public static String getAccountType(Authentication authentication) {
Object details = authentication.getDetails();
String accountType = null;
if (details != null) {
if (details instanceof CustomWebAuthenticationDetails) {
CustomWebAuthenticationDetails detailsObj = (CustomWebAuthenticationDetails) details;
accountType = detailsObj.getAccountType();
@@ -122,6 +123,7 @@ public class AuthUtils {
accountType = detailsMap.get(SecurityConstants.ACCOUNT_TYPE_PARAM_NAME);
}
}
}
return accountType;
}
}