From 29375bdca75bdbfe2ecd3c55260b73c6643712c3 Mon Sep 17 00:00:00 2001 From: Ryan Peper Date: Thu, 22 Jun 2023 11:40:21 -0400 Subject: [PATCH 1/2] Conditionally append discriminator if not 0 --- .../keycloak/social/discord/DiscordIdentityProvider.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java b/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java index 10f183e..87b4e84 100755 --- a/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java +++ b/src/main/java/org/keycloak/social/discord/DiscordIdentityProvider.java @@ -69,7 +69,14 @@ protected String getProfileEndpointForValidation(EventBuilder event) { protected BrokeredIdentityContext extractIdentityFromProfile(EventBuilder event, JsonNode profile) { BrokeredIdentityContext user = new BrokeredIdentityContext(getJsonProperty(profile, "id")); - user.setUsername(getJsonProperty(profile, "username") + "#" + getJsonProperty(profile, "discriminator")); + String username = getJsonProperty(profile, "username"); + String discriminator = getJsonProperty(profile, "discriminator"); + + if (!"0".equals(discriminator)) { + username += "#" + discriminator; + } + + user.setUsername(username); user.setEmail(getJsonProperty(profile, "email")); user.setIdpConfig(getConfig()); user.setIdp(this); From ac2ce3857ceeec3f42a032934b37f8fba0cb522d Mon Sep 17 00:00:00 2001 From: Hiroyuki Wada Date: Sat, 2 Nov 2024 14:41:46 +0900 Subject: [PATCH 2/2] build: fix release build --- .releaserc | 2 +- pom.xml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.releaserc b/.releaserc index a8a9deb..b58cdd4 100644 --- a/.releaserc +++ b/.releaserc @@ -9,7 +9,7 @@ [ "@terrestris/maven-semantic-release", { - "mavenTarget": "install", + "mavenTarget": "deploy", "clean": false, "updateSnapshotVersion": true, "settingsPath": "/home/runner/.m2/settings.xml", diff --git a/pom.xml b/pom.xml index a1e03d4..64e431d 100755 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,13 @@ 17 + + maven-deploy-plugin + 3.1.3 + + true + +