removing duplicate open id scope (#26542)

Signed-off-by: ShefeeqPM <86718986+ShefeeqPM@users.noreply.github.com>
Signed-off-by: Michal Hajas <mhajas@redhat.com>
Co-authored-by: Michal Hajas <mhajas@redhat.com>
This commit is contained in:
ShefeeqPM 2024-02-02 14:38:18 +05:30 committed by GitHub
parent 5d6646b691
commit 65c7cd6008
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,7 +181,9 @@ public class OIDCWellKnownProvider implements WellKnownProvider {
.filter(clientScope -> Objects.equals(OIDCLoginProtocol.LOGIN_PROTOCOL, clientScope.getProtocol())) .filter(clientScope -> Objects.equals(OIDCLoginProtocol.LOGIN_PROTOCOL, clientScope.getProtocol()))
.map(ClientScopeModel::getName) .map(ClientScopeModel::getName)
.collect(Collectors.toList()); .collect(Collectors.toList());
scopeNames.add(0, OAuth2Constants.SCOPE_OPENID); if (!scopeNames.contains(OAuth2Constants.SCOPE_OPENID)) {
scopeNames.add(0, OAuth2Constants.SCOPE_OPENID);
}
config.setScopesSupported(scopeNames); config.setScopesSupported(scopeNames);
} }