From 9a35dac928743a4361b47eade0a10e9550ea4dff Mon Sep 17 00:00:00 2001 From: Heather Ward Date: Fri, 15 Nov 2019 17:31:38 -0500 Subject: [PATCH] Allow prompt to be configurable The default for prompt results in users needing to consent to the discord app permissions with each login. These changes allow the prompt value to be configured. --- ear/pom.xml | 2 +- ejb/pom.xml | 2 +- .../discord/DiscordIdentityProviderConfig.java | 6 +++++- .../realm-identity-provider-discord.html | 16 ++++++++++++++++ pom.xml | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ear/pom.xml b/ear/pom.xml index 56b08a6..a566f31 100755 --- a/ear/pom.xml +++ b/ear/pom.xml @@ -3,7 +3,7 @@ org.keycloak.extensions keycloak-discord-parent - 0.1.0 + 0.1.1 Keycloak Discord EAR diff --git a/ejb/pom.xml b/ejb/pom.xml index 22a36d1..97a3359 100755 --- a/ejb/pom.xml +++ b/ejb/pom.xml @@ -3,7 +3,7 @@ org.keycloak.extensions keycloak-discord-parent - 0.1.0 + 0.1.1 Keycloak Discord EJB diff --git a/ejb/src/main/java/org/keycloak/social/discord/DiscordIdentityProviderConfig.java b/ejb/src/main/java/org/keycloak/social/discord/DiscordIdentityProviderConfig.java index 6a8170f..c049b2b 100755 --- a/ejb/src/main/java/org/keycloak/social/discord/DiscordIdentityProviderConfig.java +++ b/ejb/src/main/java/org/keycloak/social/discord/DiscordIdentityProviderConfig.java @@ -54,4 +54,8 @@ public Set getAllowedGuildsAsSet() { } return Collections.emptySet(); } -} \ No newline at end of file + + public void setPrompt(String prompt) { + getConfig().put("prompt", prompt); + } +} diff --git a/ejb/src/main/resources/theme/discord/admin/resources/partials/realm-identity-provider-discord.html b/ejb/src/main/resources/theme/discord/admin/resources/partials/realm-identity-provider-discord.html index bd48b37..75b4a7c 100755 --- a/ejb/src/main/resources/theme/discord/admin/resources/partials/realm-identity-provider-discord.html +++ b/ejb/src/main/resources/theme/discord/admin/resources/partials/realm-identity-provider-discord.html @@ -114,6 +114,22 @@ {{:: 'post-broker-login-flow.tooltip' | translate}} +
+ +
+
+ +
+
+ {{:: 'prompt.tooltip' | translate}} +
+
diff --git a/pom.xml b/pom.xml index 847fb40..9aa8c75 100755 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ org.keycloak.extensions keycloak-discord-parent - 0.1.0 + 0.1.1 pom