Skip to content

Commit

Permalink
Allow prompt to be configurable
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hkeward committed Nov 15, 2019
1 parent 39d7975 commit 9a35dac
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.keycloak.extensions</groupId>
<artifactId>keycloak-discord-parent</artifactId>
<version>0.1.0</version>
<version>0.1.1</version>
</parent>

<name>Keycloak Discord EAR</name>
Expand Down
2 changes: 1 addition & 1 deletion ejb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.keycloak.extensions</groupId>
<artifactId>keycloak-discord-parent</artifactId>
<version>0.1.0</version>
<version>0.1.1</version>
</parent>

<name>Keycloak Discord EJB</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ public Set<String> getAllowedGuildsAsSet() {
}
return Collections.emptySet();
}
}

public void setPrompt(String prompt) {
getConfig().put("prompt", prompt);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@
</div>
<kc-tooltip>{{:: 'post-broker-login-flow.tooltip' | translate}}</kc-tooltip>
</div>
<div class="form-group">
<label class="col-md-2 control-label" for="prompt">{{:: 'prompt' | translate}}</label>
<div class="col-md-6">
<div>
<select class="form-control" id="prompt" ng-model="identityProvider.config.prompt">
<option value="">{{:: 'unspecified.option' | translate}}</option>
<option value="none">{{:: 'none.option' | translate}}</option>
<option value="consent">{{:: 'consent.option' | translate}}</option>
<option value="login">{{:: 'login.option' | translate}}</option>
<option value="select_account">{{:: 'select-account.option' | translate}}</option>
</select>
</div>
</div>
<kc-tooltip>{{:: 'prompt.tooltip' | translate}}</kc-tooltip>
</div>

</fieldset>

<div class="form-group">
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>org.keycloak.extensions</groupId>
<artifactId>keycloak-discord-parent</artifactId>
<version>0.1.0</version>
<version>0.1.1</version>
<packaging>pom</packaging>

<properties>
Expand Down

0 comments on commit 9a35dac

Please sign in to comment.