Documentation ¶
Index ¶
Constants ¶
View Source
const LoginTemplateExample = `` /* 1629-byte string literal not displayed */
LoginTemplateExample is a basic template for customizing the login page.
Variables ¶
This section is empty.
Functions ¶
func NewLoginFormRenderer ¶
NewLoginFormRenderer creates a login form renderer that takes in an optional custom template to allow branding of the login page. Uses the default if customLoginTemplateFile is not set.
func ValidateLoginTemplate ¶
Types ¶
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
func NewLogin ¶
func NewLogin(provider string, csrf csrf.CSRF, auth PasswordAuthenticator, render LoginFormRenderer) *Login
type LoginForm ¶
type LoginForm struct { ProviderName string Action string Error string ErrorCode string Names LoginFormFields Values LoginFormFields }
type LoginFormFields ¶
type LoginFormRenderer ¶
type LoginFormRenderer interface {
Render(form LoginForm, w http.ResponseWriter, req *http.Request)
}
type Mux ¶
type Mux interface { Handle(pattern string, handler http.Handler) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) }
Mux is an object that can register http handlers.
type PasswordAuthenticator ¶
type PasswordAuthenticator interface { authenticator.Password handlers.AuthenticationSuccessHandler }
Click to show internal directories.
Click to hide internal directories.