Skip to content

Commit

Permalink
Update the template to allow selecting realms
Browse files Browse the repository at this point in the history
  • Loading branch information
sberyozkin committed Sep 30, 2022
1 parent 8077757 commit c5833b1
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
var devRoot = '{devRootAppend}';
var encodedDevRoot = devRoot.replaceAll("/", "%2F");

{#if info:keycloakAdminUrl?? && info:keycloakRealms??}
var realms = info:keycloakRealms??.split(",");
{/if}

{#if info:oidcGrantType is 'implicit' || info:oidcGrantType is 'code'}
var accessToken;
var idToken;
Expand Down Expand Up @@ -262,6 +266,7 @@
}

{/if}

{/if}

{#if info:oidcApplicationType is 'web-app'}
Expand Down Expand Up @@ -436,6 +441,16 @@

<div class="card implicitLoggedOut">
<div class="card-body">
{#if info:keycloakAdminUrl?? && info:keycloakRealms??}
<div class="form-group">
<label for="keycloakRealm">Keycloak realm:</label>
<select class="form-control" id="keycloakRealm">
{#for realm in realms}
<option>{realm}</option>
{/for}
</select>
</div>
{/if}
<a class="btn btn-block btn-success" title="Log into Single Page Application to Get Access and ID Tokens" onclick="signInToOidcProviderAndGetTokens();">
<i class="fas fa-user"></i> Log into Single Page Application
</a>
Expand Down

0 comments on commit c5833b1

Please sign in to comment.