Skip to content

Commit

Permalink
correct empty scopes case for UserAttribute mapper with passscope
Browse files Browse the repository at this point in the history
  • Loading branch information
cgeorgilakis-grnet committed Apr 9, 2024
1 parent 761c256 commit 94e59b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<quarkus.version>3.2.7.Final</quarkus.version>
<quarkus.build.version>3.2.7.Final</quarkus.build.version>
<eosc-kc.version>${project.version}-1.3rc1</eosc-kc.version>
<eosc-kc.version>${project.version}-1.3rc2</eosc-kc.version>

<project.build-time>${timestamp}</project.build-time>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ public void updateBrokeredUser(KeycloakSession session, RealmModel realm, UserMo
if (!CollectionUtil.collectionEquals(values, current) ) {
if (values.isEmpty()) {
Boolean passScope = Boolean.valueOf(context.getIdpConfig().getConfig().get(OAuth2IdentityProviderConfig.PASS_SCOPE));
if (passScope) {
List<String> relatedScopes = Arrays.asList(mapperModel.getConfig().get(RELATED_SCOPES).split(Constants.CFG_DELIMITER));
String relatedScopesStr = mapperModel.getConfig().get(RELATED_SCOPES);
if (passScope && relatedScopesStr != null) {
List<String> relatedScopes = Arrays.asList(relatedScopesStr.split(Constants.CFG_DELIMITER));
Set<String> scopeSet = context.getAuthenticationSession().getClient().getClientScopes(true).keySet();
String scopeParameter = context.getAuthenticationSession().getClientNote(OIDCLoginProtocol.SCOPE_PARAM);
if (scopeParameter != null && !scopeParameter.isEmpty())
Expand Down

0 comments on commit 94e59b0

Please sign in to comment.