Browse Source

feat: updated provider for Keycloak 25.x (#49)

pull/54/head
Andy Thorne 2 months ago
committed by GitHub
parent
commit
c10480b798
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      pom.xml
  2. 3
      src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java

2
pom.xml

@ -11,7 +11,7 @@
<packaging>jar</packaging>
<properties>
<version.keycloak>22.0.1</version.keycloak>
<version.keycloak>25.0.2</version.keycloak>
</properties>
<dependencies>

3
src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java

@ -67,11 +67,10 @@ public class DiscordIdentityProvider extends AbstractOAuth2IdentityProvider<Disc
@Override
protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, JsonNode profile) {
BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "id"));
BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "id"), getConfig());
user.setUsername(getJsonProperty(profile, "username") + "#" + getJsonProperty(profile, "discriminator"));
user.setEmail(getJsonProperty(profile, "email"));
user.setIdpConfig(getConfig());
user.setIdp(this);
AbstractJsonUserAttributeMapper.storeUserProfileForMapper(user, profile, getConfig().getAlias());

Loading…
Cancel
Save