Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KratosAuthParams ¶
type KratosAuthParams struct { session.SessionStore // WhoAmIURL is the API endpoint fo the Kratis 'whoami' call that returns the // details of an authenticated session WhoAmIURL string // RedirectUnauthURL is where we will rerirect to if the session is // not associated with a valid user RedirectUnauthURL string }
KratosAuthParams configure the KratosAuth http handler
func (KratosAuthParams) KratoAuthMiddleware ¶
func (p KratosAuthParams) KratoAuthMiddleware(next http.Handler) http.Handler
KratoAuthMiddleware retrieves the user from the session via Kratos WhoAmIURL, and if the user is authenticated the request will proceed through the middleware chain. If the session is not authenticated, redirects to the RedirectUnauthURL
Click to show internal directories.
Click to hide internal directories.