show requested scope

pull/25/head
Niko Abeler 3 months ago
parent 0dc200e0b0
commit 23d07d56f7
  1. 10
      embed/auth.html
  2. 2
      renderer.go

@ -1,12 +1,14 @@
<h2>Authorization for {{.ClientId}}</h2>
<h3>Authorization for {{.ClientId}}</h3>
Requesting scope:
<h5>Requesting scope:</h5>
<ul>
{{range .Scopes}}
<li>{{.}}</li>
{{range $index, $element := .Scopes}}
<li>{{$element}}</li>
{{end}}
</ul>
<br><br>
<form action="verify/" method="post">
<label for="password">Password</label>
<input type="password" name="password" placeholder="Password">

@ -125,12 +125,12 @@ func RenderIndexPage(user User) (string, error) {
}
func RenderUserAuthPage(reqData AuthRequestData) (string, error) {
reqData.Scopes = strings.Split(reqData.Scope, " ")
authHtml, err := renderEmbedTemplate("embed/auth.html", reqData)
if err != nil {
return "", err
}
reqData.Scopes = strings.Split(reqData.Scope, " ")
return renderIntoBaseTemplate(reqData.User, PageContent{
Title: "Auth",
Content: template.HTML(authHtml),

Loading…
Cancel
Save