chore (refactoring): follow auth middleware standard

This commit is contained in:
MickaelK 2025-11-04 18:17:08 +11:00
parent 563a77837d
commit a7177b8c82
3 changed files with 4 additions and 4 deletions

View file

@ -53,7 +53,7 @@ func (this Admin) EntryPoint(idpParams map[string]string, req *http.Request, res
res.Header().Set("Content-Type", "text/html; charset=utf-8")
res.WriteHeader(http.StatusOK)
res.Write([]byte(Page(`
<form action="` + WithBase("/api/session/auth/") + `" method="post">
<form method="post">
<label>
<input type="password" name="password" value="" placeholder="Admin Password" />
</label>

View file

@ -73,7 +73,7 @@ func (this Htpasswd) EntryPoint(idpParams map[string]string, req *http.Request,
res.Header().Set("Content-Type", "text/html; charset=utf-8")
res.WriteHeader(http.StatusOK)
res.Write([]byte(Page(`
<form action="` + WithBase("/api/session/auth/") + `" method="post" class="component_middleware">
<form method="post" class="component_middleware">
<label>
<input type="text" name="user" value="" placeholder="User" autocorrect="off" autocapitalize="off" />
</label>

View file

@ -113,7 +113,7 @@ func (this SimpleAuth) EntryPoint(idpParams map[string]string, req *http.Request
return err
}
template.Must(template.New("app").Parse(Page(`
<form action="`+WithBase("/api/session/auth/")+`" method="post" class="component_middleware">
<form method="post" class="component_middleware">
{{ if eq .User.MFA "" }}
<style>
#init { padding: 20px 20px 10px 20px; text-align: center; background: rgba(0,0,0,0.1); border-radius: 10px; margin-top: -10vh; margin-bottom: 20px; }
@ -148,7 +148,7 @@ func (this SimpleAuth) EntryPoint(idpParams map[string]string, req *http.Request
return nil
}
res.Write([]byte(Page(`
<form action="` + WithBase("/api/session/auth/") + `" method="post" class="component_middleware">
<form method="post" class="component_middleware">
<label>
<input type="text" name="user" value="" placeholder="Email" />
</label>