KEYCLOAK-12885 Make sure empty protocol in client scope doesn't result in NPE in well-known endpoint

This commit is contained in:
stianst 2020-03-03 13:52:16 +01:00 committed by Stian Thorgersen
parent 23b4aee445
commit b84160786b

View file

@ -117,7 +117,7 @@ public class OIDCWellKnownProvider implements WellKnownProvider {
List<ClientScopeModel> scopes = realm.getClientScopes(); List<ClientScopeModel> scopes = realm.getClientScopes();
List<String> scopeNames = new LinkedList<>(); List<String> scopeNames = new LinkedList<>();
for (ClientScopeModel clientScope : scopes) { for (ClientScopeModel clientScope : scopes) {
if (clientScope.getProtocol().equals(OIDCLoginProtocol.LOGIN_PROTOCOL)) { if (OIDCLoginProtocol.LOGIN_PROTOCOL.equals(clientScope.getProtocol())) {
scopeNames.add(clientScope.getName()); scopeNames.add(clientScope.getName());
} }
} }