aboutsummaryrefslogtreecommitdiffstats
path: root/web/command/handler/authenticate.go
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.net>2026-03-19 17:14:20 +0000
committerLeonardo Bishop <me@leonardobishop.net>2026-03-19 17:14:20 +0000
commit66bd5d2f7fd84eec39d69f4a8f5c435fc978804f (patch)
tree20bfd8637cce28750b4a66bdd9aa47cb9831308b /web/command/handler/authenticate.go
parent60cd7875c2c9ee595012078a3ba8f13b71c73dc9 (diff)
Add site passwordsHEADmaster
Diffstat (limited to 'web/command/handler/authenticate.go')
-rw-r--r--web/command/handler/authenticate.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/web/command/handler/authenticate.go b/web/command/handler/authenticate.go
index 1c7d312..a463e7f 100644
--- a/web/command/handler/authenticate.go
+++ b/web/command/handler/authenticate.go
@@ -14,7 +14,7 @@ import (
func GetAuthenticate() func(http.ResponseWriter, *http.Request) {
return ghttp.Adapt(func(w http.ResponseWriter, r *http.Request) (Node, error) {
- return html.AuthenticatePage(""), nil
+ return html.AuthenticateScrapbookPage(""), nil
})
}
@@ -22,20 +22,20 @@ func PostAuthenticate(mainConfig *config.MainConfig, authenticator *auth.Authent
return func(w http.ResponseWriter, r *http.Request) {
err := r.ParseForm()
if err != nil {
- html.AuthenticatePage(err.Error()).Render(w)
+ html.AuthenticateScrapbookPage(err.Error()).Render(w)
return
}
token := r.Form.Get("token")
if len(mainConfig.Command.Secret) == 0 || subtle.ConstantTimeCompare([]byte(token), []byte(mainConfig.Command.Secret)) != 1 {
- html.AuthenticatePage("The secret key is incorrect").Render(w)
+ html.AuthenticateScrapbookPage("The secret key is incorrect").Render(w)
return
}
jwt, err := authenticator.NewJwt()
if err != nil {
- html.AuthenticatePage(fmt.Errorf("Failed to create jwt: %w", err).Error()).Render(w)
+ html.AuthenticateScrapbookPage(fmt.Errorf("Failed to create jwt: %w", err).Error()).Render(w)
return
}