KEYCLOAK-11178 Suppress incorrect warnings

This commit is contained in:
Kohei Tamura 2019-08-23 17:31:08 +09:00 committed by Marek Posolda
parent 7ab854fecf
commit 09671aa480

View file

@ -868,13 +868,13 @@ public class LoginActionsService {
for (String clientScopeId : authSession.getClientScopes()) {
ClientScopeModel clientScope = KeycloakModelUtils.findClientScopeById(realm, client, clientScopeId);
if (clientScope != null && clientScope.isDisplayOnConsentScreen()) {
if (!grantedConsent.isClientScopeGranted(clientScope)) {
if (clientScope != null) {
if (!grantedConsent.isClientScopeGranted(clientScope) && clientScope.isDisplayOnConsentScreen()) {
grantedConsent.addGrantedClientScope(clientScope);
updateConsentRequired = true;
}
} else {
logger.warnf("Client scope with ID '%s' not found", clientScopeId);
logger.warnf("Client scope or client with ID '%s' not found", clientScopeId);
}
}