Documentation
¶
Index ¶
- Variables
- func RedirectIfAuthenticated(sessionService *session.Service, now func() time.Time) func(http.Handler) http.Handler
- func RequestLogger(logger *slog.Logger) func(http.Handler) http.Handler
- func RequireAPIAccessAuth(sessionSvc *session.Service, audience token.Audience, now func() time.Time) func(http.Handler) http.Handler
- func RequireAPICSRF(next http.Handler) http.Handler
- func RequireAccessAuthWithRefresh(sessionSvc *session.Service, audience token.Audience, accessTTL time.Duration, ...) func(http.Handler) http.Handler
- func RequireAdmin(next http.Handler) http.Handler
- func RequireCSRF(next http.Handler) http.Handler
- func ReturnTo(next http.Handler) http.Handler
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RedirectIfAuthenticated ¶
func RequireAPIAccessAuth ¶
func RequireAccessAuthWithRefresh ¶
func RequireAccessAuthWithRefresh( sessionSvc *session.Service, audience token.Audience, accessTTL time.Duration, refreshTTL time.Duration, now func() time.Time, ) func(http.Handler) http.Handler
RequirePageAccessAuthWithRefresh protects Authara-rendered pages + HTMX actions. It validates the access token, and if it's missing/expired it will try to refresh using the refresh token cookie. If refresh fails, it redirects to login.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.