IndieAuth #25
|
@ -1,5 +1,12 @@
|
|||
<h2>Authorization for {{.ClientId}}</h2>
|
||||
|
||||
Requesting scope:
|
||||
<ul>
|
||||
{{range .Scopes}}
|
||||
<li>{{.}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
<form action="verify/" method="post">
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password" placeholder="Password">
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
_ "embed"
|
||||
"html/template"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type PageContent struct {
|
||||
|
@ -26,6 +27,7 @@ type AuthRequestData struct {
|
|||
RedirectUri string
|
||||
State string
|
||||
Scope string
|
||||
Scopes []string // Split version of scope. filled by rendering function.
|
||||
ResponseType string
|
||||
CodeChallenge string
|
||||
CodeChallengeMethod string
|
||||
|
@ -128,6 +130,7 @@ func RenderUserAuthPage(reqData AuthRequestData) (string, error) {
|
|||
return "", err
|
||||
}
|
||||
|
||||
reqData.Scopes = strings.Split(reqData.Scope, " ")
|
||||
return renderIntoBaseTemplate(reqData.User, PageContent{
|
||||
Title: "Auth",
|
||||
Content: template.HTML(authHtml),
|
||||
|
|
Loading…
Reference in New Issue