Documentation
¶
Index ¶
- type Config
- func (c *Config) CallbackHandler(w http.ResponseWriter, r *http.Request)
- func (c *Config) LoginHandler(w http.ResponseWriter, r *http.Request)
- func (c *Config) LogoutCallbackHandler(w http.ResponseWriter, r *http.Request)
- func (c *Config) LogoutHandler(w http.ResponseWriter, r *http.Request)
- func (c *Config) Middleware() func(http.Handler) http.Handler
- func (c *Config) RegisterHandlers(mux *http.ServeMux)
- func (c *Config) RegistrationHandler(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Store *sessions.CookieStore OAuthConfig *oauth2.Config Verifier *oidc.IDTokenVerifier Provider *oidc.Provider SessionName string DB db.Querier }
Config holds all auth-related configuration
func (*Config) CallbackHandler ¶
func (c *Config) CallbackHandler(w http.ResponseWriter, r *http.Request)
CallbackHandler processes the OIDC callback
func (*Config) LoginHandler ¶
func (c *Config) LoginHandler(w http.ResponseWriter, r *http.Request)
LoginHandler initiates the OIDC authentication flow
func (*Config) LogoutCallbackHandler ¶
func (c *Config) LogoutCallbackHandler(w http.ResponseWriter, r *http.Request)
LogoutCallbackHandler handles the redirect after Keycloak logout
func (*Config) LogoutHandler ¶
func (c *Config) LogoutHandler(w http.ResponseWriter, r *http.Request)
LogoutHandler handles user logout
func (*Config) Middleware ¶
Middleware returns an auth middleware function
func (*Config) RegisterHandlers ¶
RegisterHandlers adds all auth-related handlers to the router
func (*Config) RegistrationHandler ¶
func (c *Config) RegistrationHandler(w http.ResponseWriter, r *http.Request)
RegistrationHandler redirects to the OIDC registration page
Click to show internal directories.
Click to hide internal directories.