Documentation
¶
Index ¶
- func LoginContent(enableRegistration bool, urlRegister, urlPasswordRestore string) string
- func LoginPasswordlessContent(enableRegistration bool, urlRegister string) string
- func LoginPasswordlessScripts(urlApiLogin, urlSuccess string) string
- func LoginScripts(urlApiLogin, urlOnSuccess string) string
- func PageLogin(w http.ResponseWriter, r *http.Request, a types.AuthSharedInterface)
- type Dependencies
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoginContent ¶
LoginContent builds the HTML content for the standard login page.
func LoginPasswordlessContent ¶
LoginPasswordlessContent builds the HTML content for the passwordless login page.
func LoginPasswordlessScripts ¶
LoginPasswordlessScripts builds the JavaScript for the passwordless login page.
func LoginScripts ¶
LoginScripts builds the JavaScript for the standard login page.
func PageLogin ¶
func PageLogin(w http.ResponseWriter, r *http.Request, a types.AuthSharedInterface)
Types ¶
type Dependencies ¶
type Dependencies struct {
Passwordless bool
EnableRegistration bool
Endpoint string
RedirectOnSuccess string
// Layout is the outer layout function supplied by the auth package.
Layout func(content string) string
Logger *slog.Logger
}
Dependencies contains the dependencies required to render the login page.
Click to show internal directories.
Click to hide internal directories.