Set custom oidc client id and secret in the backend

This commit is contained in:
Johannes Zellner
2023-10-06 14:11:54 +02:00
parent 41319bc817
commit 5e7bc78d35
6 changed files with 91 additions and 70 deletions

View File

@@ -112,21 +112,11 @@
<br/>
<br/>
<form name="clientAddForm" role="form" novalidate ng-submit="clientAdd.submit()" autocomplete="off">
<p class="text-danger" ng-show="clientAdd.error">{{ clientAdd.error }}</p>
<div class="form-group">
<label class="control-label" for="clientName">{{ 'oidc.client.name' | tr }}</label>
<input type="text" id="clientName" class="form-control" name="clientName" ng-model="clientAdd.name" autofocus required/>
</div>
<div class="form-group" ng-class="{ 'has-error': clientAdd.error.id }">
<label class="control-label" for="clientId">{{ 'oidc.client.id' | tr }}</label>
<input type="text" id="clientId" class="form-control" name="clientId" ng-model="clientAdd.id" required/>
<div class="control-label" ng-show="clientAdd.error.id">
<small>{{ clientAdd.error.id }}</small>
</div>
</div>
<div class="form-group">
<label class="control-label" for="clientSecret">{{ 'oidc.client.secret' | tr }}</label>
<input type="text" id="clientSecret" class="form-control" name="clientSecret" ng-model="clientAdd.secret" required/>
</div>
<div class="form-group">
<label class="control-label" for="loginRedirectUri">{{ 'oidc.client.loginRedirectUri' | tr }}</label>
<input type="text" id="loginRedirectUri" class="form-control" name="loginRedirectUri" ng-model="clientAdd.loginRedirectUri" required/>
@@ -158,18 +148,37 @@
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">{{ 'oidc.editClientDialog.title' | tr:{ client: clientEdit.id } }}</h4>
<h4 class="modal-title">{{ 'oidc.editClientDialog.title' | tr:{ client: clientEdit.name } }}</h4>
</div>
<div class="modal-body">
<form name="clientEditForm" role="form" novalidate ng-submit="clientEdit.submit()" autocomplete="off">
<p class="text-danger" ng-show="clientEdit.error">{{ clientEdit.error }}</p>
<div class="form-group">
<label class="control-label">{{ 'oidc.client.id' | tr }}</label>
<div class="input-group">
<input type="text" id="clientIdInput" class="form-control" ng-value="clientEdit.id" readonly/>
<span class="input-group-btn">
<button class="btn btn-primary" id="clientIdInputClipboardButton" type="button" data-clipboard-target="#clientIdInput"><i class="fa fa-clipboard"></i></button>
</span>
</div>
</div>
<div class="form-group">
<label class="control-label">{{ 'oidc.client.secret' | tr }}</label>
<div class="input-group">
<input type="text" id="clientSecretInput" class="form-control" ng-value="clientEdit.secret" readonly/>
<span class="input-group-btn">
<button class="btn btn-primary" id="clientSecretInputClipboardButton" type="button" data-clipboard-target="#clientSecretInput"><i class="fa fa-clipboard"></i></button>
</span>
</div>
</div>
<div class="form-group">
<label class="control-label" for="inputEditClientName">{{ 'oidc.client.name' | tr }}</label>
<input type="text" id="inputEditClientName" class="form-control" name="clientName" ng-model="clientEdit.name" autofocus required/>
</div>
<div class="form-group">
<label class="control-label" for="inputEditClientSecret">{{ 'oidc.client.secret' | tr }}</label>
<input type="text" id="inputEditClientSecret" class="form-control" name="clientSecret" ng-model="clientEdit.secret" required/>
</div>
<div class="form-group">
<label class="control-label" for="inputEditLoginRedirectUri">{{ 'oidc.client.loginRedirectUri' | tr }}</label>
<input type="text" id="inputEditLoginRedirectUri" class="form-control" name="loginRedirectUri" ng-model="clientEdit.loginRedirectUri" required/>
@@ -495,10 +504,9 @@
<table class="table table-hover">
<thead>
<tr>
<th style="width: 33%">{{ 'oidc.client.name' | tr }}</th>
<th style="width: 33%">{{ 'oidc.client.id' | tr }}</th>
<th style="width: 33%">{{ 'oidc.client.signingAlgorithm' | tr }}</th>
<th style="width: 10%" class="text-right">{{ 'main.actions' | tr }}</th>
<th style="width: 40%">{{ 'oidc.client.name' | tr }}</th>
<th style="width: 40%">{{ 'oidc.client.signingAlgorithm' | tr }}</th>
<th style="width: 20%" class="text-right">{{ 'main.actions' | tr }}</th>
</tr>
</thead>
<tbody>
@@ -509,9 +517,6 @@
<td class="text-left elide-table-cell hand" ng-click="clientEdit.show(client)">
{{ client.name }}
</td>
<td class="text-left elide-table-cell hand" ng-click="clientEdit.show(client)">
{{ client.id }}
</td>
<td class="text-left elide-table-cell hand" ng-click="clientEdit.show(client)">
{{ client.tokenSignatureAlgorithm }}
</td>