Skip to content

Commit

Permalink
Change order of authnauthorities (current IdP last in the list)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgeorgilakis-grnet committed Jan 23, 2025
1 parent 3f6105b commit 9e94313
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ All notable changes in keycloak-group-management will be documented in this file
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.4.0] - 2025-01-23

### Changed
- Change order of authnauthorities (current IdP last in the list)

## [1.3.1] - 2025-01-21

### Fixed
- Fix Leave Group Confirmation Window

## [1.3.0] - 2025-01-21
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<quarkus.version>3.2.7.Final</quarkus.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<agm-version>1.3.1</agm-version>
<agm-version>1.4.0</agm-version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ private String getAuthnAuthorities(UserSessionModel userSession, String idpAlias
String previousAauthnAuthorities = userSession.getNote(IDENTITY_PROVIDER_AUTHN_AUTHORITIES);
RealmModel realm = userSession.getRealm();
IdentityProviderModel idp = realm.getIdentityProviderByAlias(idpAlias);
//add first authn autohrities
authnAuthorities.add(new AuthnAuthorityRepresentation(userSession.getNote(IDENTITY_PROVIDER_ID), getIdPName(idp)));
if (previousAauthnAuthorities != null) {
authnAuthorities.addAll(JsonSerialization.readValue(previousAauthnAuthorities, new TypeReference<LinkedList<AuthnAuthorityRepresentation>>() {
}));
}
authnAuthorities.add(new AuthnAuthorityRepresentation(userSession.getNote(IDENTITY_PROVIDER_ID), getIdPName(idp)));
return JsonSerialization.writeValueAsString(authnAuthorities);
}

Expand Down

0 comments on commit 9e94313

Please sign in to comment.