admin: Replace PKI page by authentication settings, refactor
This commit is contained in:
parent
4dcf1218d8
commit
7e301b8ecb
6 changed files with 114 additions and 33 deletions
57
admin/static/views/auth.html
Normal file
57
admin/static/views/auth.html
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h2>
|
||||
Authentification
|
||||
</h2>
|
||||
<div>
|
||||
<div class="btn-group mr-1" role="group">
|
||||
<button type="button" ng-click="generateHtpasswd()" class="btn btn-sm btn-secondary"><span class="glyphicon glyphicon-save-file" aria-hidden="true"></span> Générer <code>fichtpasswd</code></button>
|
||||
<button type="button" ng-click="removeHtpasswd()" class="btn btn-sm btn-danger"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-controller="OAuthController">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h3>
|
||||
OAuth 2
|
||||
<span class="badge badge-success" ng-if="oauth_status.secret_defined">Actif</span>
|
||||
<span class="badge badge-danger" ng-if="!oauth_status.secret_defined">Non configuré</span>
|
||||
</h3>
|
||||
<div>
|
||||
<button type="button" ng-click="genDexCfg()" class="btn btn-success mr-2"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> DexIdP</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div ng-controller="PKIController">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h3>
|
||||
Autorité de certification
|
||||
<span class="badge badge-success" ng-if="ca.version">Générée</span>
|
||||
<span class="badge badge-danger" ng-if="!ca.version">Introuvable</span>
|
||||
</h3>
|
||||
<div>
|
||||
<a
|
||||
class="btn btn-primary"
|
||||
href="/pki"
|
||||
>
|
||||
<span class="glyphicon glyphicon-certificate" aria-hidden="true"></span>
|
||||
Gérer la PKI
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info" ng-if="!ca.version">
|
||||
<strong>Aucune CA n'a été générée pour le moment.</strong>
|
||||
</div>
|
||||
|
||||
<dl ng-if="ca.version">
|
||||
<ng-repeat ng-repeat="(k, v) in ca" class="row">
|
||||
<dt class="col-3 text-right">{{ k }}</dt>
|
||||
<dd class="col-9" ng-if="v.CommonName">/CN={{ v.CommonName }}/OU={{ v.OrganizationalUnit }}/O={{ v.Organization }}/L={{ v.Locality }}/P={{ v.Province }}/C={{ v.Country }}/</dd>
|
||||
<dd class="col-9" ng-if="!v.CommonName">{{ v }}</dd>
|
||||
</ng-repeat>
|
||||
</dl>
|
||||
</div>
|
||||
Reference in a new issue