IndieAuth #25
|
@ -1,12 +1,14 @@
|
||||||
<h2>Authorization for {{.ClientId}}</h2>
|
<h3>Authorization for {{.ClientId}}</h3>
|
||||||
|
|
||||||
Requesting scope:
|
<h5>Requesting scope:</h5>
|
||||||
<ul>
|
<ul>
|
||||||
{{range .Scopes}}
|
{{range $index, $element := .Scopes}}
|
||||||
<li>{{.}}</li>
|
<li>{{$element}}</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
<form action="verify/" method="post">
|
<form action="verify/" method="post">
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
<input type="password" name="password" placeholder="Password">
|
<input type="password" name="password" placeholder="Password">
|
||||||
|
|
|
@ -125,12 +125,12 @@ func RenderIndexPage(user User) (string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func RenderUserAuthPage(reqData AuthRequestData) (string, error) {
|
func RenderUserAuthPage(reqData AuthRequestData) (string, error) {
|
||||||
|
reqData.Scopes = strings.Split(reqData.Scope, " ")
|
||||||
authHtml, err := renderEmbedTemplate("embed/auth.html", reqData)
|
authHtml, err := renderEmbedTemplate("embed/auth.html", reqData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
reqData.Scopes = strings.Split(reqData.Scope, " ")
|
|
||||||
return renderIntoBaseTemplate(reqData.User, PageContent{
|
return renderIntoBaseTemplate(reqData.User, PageContent{
|
||||||
Title: "Auth",
|
Title: "Auth",
|
||||||
Content: template.HTML(authHtml),
|
Content: template.HTML(authHtml),
|
||||||
|
|
Loading…
Reference in New Issue