Merge branch '6.1.x'
This commit is contained in:
@@ -64,9 +64,8 @@ public final class SwitchUserGrantedAuthority implements GrantedAuthority {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof SwitchUserGrantedAuthority) {
|
||||
SwitchUserGrantedAuthority swa = (SwitchUserGrantedAuthority) obj;
|
||||
return this.role.equals(swa.role) && this.source.equals(swa.source);
|
||||
if (obj instanceof SwitchUserGrantedAuthority swa) {
|
||||
return this.role.equals(swa.getAuthority()) && this.source.equals(swa.getSource());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -127,10 +127,9 @@ public class JaasApiIntegrationFilter extends GenericFilterBean {
|
||||
if (!authentication.isAuthenticated()) {
|
||||
return null;
|
||||
}
|
||||
if (!(authentication instanceof JaasAuthenticationToken)) {
|
||||
if (!(authentication instanceof JaasAuthenticationToken token)) {
|
||||
return null;
|
||||
}
|
||||
JaasAuthenticationToken token = (JaasAuthenticationToken) authentication;
|
||||
LoginContext loginContext = token.getLoginContext();
|
||||
if (loginContext == null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user