Implement consent workflow

This commit is contained in:
Jan Dittberner 2020-12-31 19:11:06 +01:00
parent 7a2174ea41
commit e4f17ca315
12 changed files with 382 additions and 140 deletions

10
templates/base.gohtml Normal file
View file

@ -0,0 +1,10 @@
{{ define "base" }}
<!DOCTYPE html>
<html lang="en">
<head><title>{{ .Title }}</title></head>
<body>
<h1>{{ .Title }}</h1>
{{ template "content" . }}
</body>
</html>
{{ end }}

View file

@ -1,10 +0,0 @@
{{ define "base" }}
<!DOCTYPE html>
<html lang="en">
<head><title>{{ .Title }}</title></head>
<body>
<h1>{{ .Title }}</h1>
{{ template "content" . }}
</body>
</html>
{{ end }}

24
templates/consent.gohtml Normal file
View file

@ -0,0 +1,24 @@
{{ define "content" }}
<p>{{ .IntroConsentRequested }}</p>
{{ if .client.LogoURI }}
<p>
<img src="{{ .client.LogoURI }}" alt="{{ .client.ClientName }}"/>
</p>
{{ end }}
<p>{{ .IntroMoreInformation }}</p>
<form method="post">
{{ .csrfField }}
<ul>
{{ range .requestedScope }}
<li>{{ .Label }}</li>
{{ end }}
</ul>
<p>
<input type="checkbox" name="consent" id="consent" value="true"/> <label
for="consent">{{ .LabelConsent }}</label>
</p>
<button type="submit">{{ .LabelSubmit }}</button>
</form>
{{ end }}