Basic but complete authentication flow

This commit is contained in:
2020-05-20 11:13:14 +02:00
parent 81778121fb
commit 61aae078b5
32 changed files with 626 additions and 442 deletions

View File

@ -1,8 +1,34 @@
{{define "title"}}Consent{{end}}
{{define "title"}}Autorisation{{end}}
{{define "body"}}
<section class="home is-fullheight section">
<div class="container">
<section class="hero is-fullheight">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column is-4 is-offset-4">
{{template "flash" .}}
<p class="has-text-black title has-text-centered">
Demande d'autorisation
</p>
<p class="has-text-black subtitle has-text-centered">
Autorisez vous l'application à utiliser ces informations vous concernant ?
</p>
<div class="box">
<form action="/consent" method="POST">
{{range .RequestedScope}}
<div class="">
<label class="checkbox">
<input type="checkbox" name="scope_{{ . }}">
{{ . }}
</label>
</div>
{{end}}
{{ .csrfField }}
<input name="challenge" type="hidden" value="{{ .ConsentChallenge }}" />
<button type="submit" class="button is-link is-medium is-block is-fullwidth">Autoriser</button>
</form>
</div>
</div>
</div>
</div>
</section>
{{end}}

View File

@ -1,11 +0,0 @@
{{define "title"}}Accueil{{end}}
{{define "body"}}
<section class="home is-fullheight section">
<div class="container">
{{template "header" .}}
<h1>Bienvenue !</h1>
{{template "footer" .}}
</div>
</section>
{{end}}
{{template "base" .}}