handle sign in directly (if using htpasswd)
This commit is contained in:
parent
4367e47a46
commit
c97de52200
@ -202,7 +202,7 @@ func (p *OauthProxy) SignInPage(rw http.ResponseWriter, req *http.Request, code
|
|||||||
rw.WriteHeader(code)
|
rw.WriteHeader(code)
|
||||||
templates := getTemplates()
|
templates := getTemplates()
|
||||||
|
|
||||||
t := struct{
|
t := struct {
|
||||||
SignInMessage string
|
SignInMessage string
|
||||||
Htpasswd bool
|
Htpasswd bool
|
||||||
}{
|
}{
|
||||||
@ -212,8 +212,8 @@ func (p *OauthProxy) SignInPage(rw http.ResponseWriter, req *http.Request, code
|
|||||||
templates.ExecuteTemplate(rw, "sign_in.html", t)
|
templates.ExecuteTemplate(rw, "sign_in.html", t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *OauthProxy) ManualSignIn(rw http.ResponseWriter, req *http.Request) (string, bool){
|
func (p *OauthProxy) ManualSignIn(rw http.ResponseWriter, req *http.Request) (string, bool) {
|
||||||
if req.Method != "POST" || p.HtpasswdFile == nil{
|
if req.Method != "POST" || p.HtpasswdFile == nil {
|
||||||
return "", false
|
return "", false
|
||||||
}
|
}
|
||||||
user := req.FormValue("username")
|
user := req.FormValue("username")
|
||||||
|
Loading…
Reference in New Issue
Block a user