Add client approval flow
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Melora Hugues 2023-10-17 17:42:22 +02:00
parent 1e8b9ef161
commit 3281d109f7
2 changed files with 45 additions and 1 deletions

View file

@ -54,7 +54,7 @@ func main() {
Storage: memory.New(logger.L),
Issuer: conf.OpenConnectConfig.Issuer,
SupportedResponseTypes: []string{"code"},
SkipApprovalScreen: true,
SkipApprovalScreen: false,
AllowedOrigins: []string{"*"},
Logger: logger.L,
PrometheusRegistry: prometheus.NewRegistry(),

View file

@ -0,0 +1,44 @@
{{ template "header.html" . }}
<div class="theme-panel">
<h2 class="theme-heading">Grant Access</h2>
<hr class="dex-separator">
<div>
{{ if .Scopes }}
<div class="dex-subtle-text">{{ .Client }} would like to:</div>
<ul class="dex-list">
{{ range $scope := .Scopes }}
<li>{{ $scope }}</li>
{{ end }}
</ul>
{{ else }}
<div class="dex-subtle-text">{{ .Client }} has not requested any personal information</div>
{{ end }}
</div>
<hr class="dex-separator">
<div>
<div class="theme-form-row">
<form method="post">
<input type="hidden" name="req" value="{{ .AuthReqID }}" />
<input type="hidden" name="approval" value="approve">
<button type="submit" class="dex-btn theme-btn--success">
<span class="dex-btn-text">Grant Access</span>
</button>
</form>
</div>
<div class="theme-form-row">
<form method="post">
<input type="hidden" name="req" value="{{ .AuthReqID }}" />
<input type="hidden" name="approval" value="rejected">
<button type="submit" class="dex-btn theme-btn-provider">
<span class="dex-btn-text">Cancel</span>
</button>
</form>
</div>
</div>
</div>
{{ template "footer.html" . }}