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})
|
||||
}
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
|
||||
<div>
|
||||
<label class="input_label">Username</label><br />
|
||||
<input type="text" name="username" placeholder="" required />
|
||||
<input type="text" name="username" placeholder="" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="input_label">Password</label><br />
|
||||
<div class="password_box">
|
||||
<input type="password" name="password" placeholder="" required />
|
||||
<input type="password" name="password" placeholder="" />
|
||||
<button type="button" class="show_password_toggle closed"></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user