actually do some OAuth
This commit is contained in:
@@ -25,8 +25,8 @@ type PasswordAuthData struct {
|
||||
}
|
||||
|
||||
type OAuthAuthData struct {
|
||||
Username string
|
||||
Password string
|
||||
ResponseWriter *http.ResponseWriter
|
||||
Request *http.Request
|
||||
}
|
||||
|
||||
type CustomizableLoginData struct {
|
||||
@@ -62,7 +62,10 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
|
||||
tmpl.Execute(w, LoginPageData{IsHiddenClassList: "", LoginData: LoginPageDataCustomizations})
|
||||
}
|
||||
} else {
|
||||
auth_success := LoginPageDataCustomizations.AuthRequestFunction(AuthStyleOAuth, OAuthAuthData{})
|
||||
auth_success := LoginPageDataCustomizations.AuthRequestFunction(AuthStyleOAuth, OAuthAuthData{
|
||||
ResponseWriter: &w,
|
||||
Request: r,
|
||||
})
|
||||
if auth_success == false {
|
||||
tmpl.Execute(w, LoginPageData{IsHiddenClassList: "", LoginData: LoginPageDataCustomizations})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user