Skip to content

Commit

Permalink
Update to Keycloak v25
Browse files Browse the repository at this point in the history
  • Loading branch information
NotActuallyTerry committed Jul 11, 2024
1 parent 89c628c commit b8f8dcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

<groupId>org.keycloak.extensions</groupId>
<artifactId>keycloak-discord</artifactId>
<version>0.5.2</version>
<version>0.5.3</version>
<packaging>jar</packaging>

<properties>
<version.keycloak>23.0.0</version.keycloak>
<version.keycloak>25.0.0</version.keycloak>
</properties>

<dependencies>
Expand Down Expand Up @@ -48,8 +48,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
<source>21</source>
<target>21</target>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ protected String getProfileEndpointForValidation(EventBuilder event) {

@Override
protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, JsonNode profile) {
BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "id"));

String id = getJsonProperty(profile, "id");
String username = getJsonProperty(profile, "username");
String discriminator = getJsonProperty(profile, "discriminator");

BrokeredIdentityContext user = new BrokeredIdentityContext(id, getConfig());

if (!"0".equals(discriminator)) {
username += "#" + discriminator;
}

user.setUsername(username);
user.setEmail(getJsonProperty(profile, "email"));
user.setIdpConfig(getConfig());
user.setIdp(this);

AbstractJsonUserAttributeMapper.storeUserProfileForMapper(user, profile, getConfig().getAlias());
Expand Down

0 comments on commit b8f8dcd

Please sign in to comment.