Documentation
¶
Index ¶
- Variables
- func HTMXMiddleware(next http.Handler) http.Handler
- func LimitRequestBody(maxBytes int64) func(http.Handler) http.Handler
- func OptionalAccessIdentity(sessionSvc *session.Service, audience token.Audience, now func() time.Time) func(http.Handler) http.Handler
- 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 RequireAccessAuthWithRefreshPolicy(sessionSvc *session.Service, audience token.Audience, ...) func(http.Handler) http.Handler
- func RequireAdmin(next http.Handler) http.Handler
- func RequireAllowlistEnabled(enabled bool) func(http.Handler) http.Handler
- func RequireAllowlistEnabledWithPolicy(policy config.AllowlistPolicyReader) func(http.Handler) http.Handler
- func RequireCSRF(next http.Handler) http.Handler
- func RequireChallengeEnabled(enabled bool) func(http.Handler) http.Handler
- func RequireInternalAPIAuth(token string) func(http.Handler) http.Handler
- func RequireOperator(next http.Handler) http.Handler
- func RequirePublicOrganizationManagement(enabled bool) func(http.Handler) http.Handler
- func RequirePublicOrganizationManagementWithPolicy(policy config.OrganizationPolicyReader) func(http.Handler) http.Handler
- func RequireRecentAuthenticationAPI(sessionService *session.Service, now func() time.Time) func(http.Handler) http.Handler
- func RequireRecentAuthenticationUI(sessionService *session.Service, now func() time.Time) func(http.Handler) http.Handler
- func RequireVerifiedEmailAPI(service emailVerificationStarter, policy config.AuthenticationPolicyReader, ...) func(http.Handler) http.Handler
- func RequireVerifiedEmailUI(service emailVerificationStarter, policy config.AuthenticationPolicyReader, ...) func(http.Handler) http.Handler
- func ReturnTo(next http.Handler) http.Handler
- func ReturnToWithDefault(defaultReturnTo string) func(http.Handler) http.Handler
- func ReturnToWithPolicy(policy config.UIPolicyReader) func(http.Handler) http.Handler
- func SecurityHeaders(cfg SecurityHeadersConfig) func(http.Handler) http.Handler
- func TrustedRealIP(trustedProxies []netip.Prefix) func(http.Handler) http.Handler
- type SecurityHeadersConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func LimitRequestBody ¶ added in v0.20.0
func OptionalAccessIdentity ¶ added in v0.1.16
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.
func RequireAccessAuthWithRefreshPolicy ¶ added in v0.21.0
func RequireAllowlistEnabled ¶ added in v0.1.23
func RequireAllowlistEnabledWithPolicy ¶ added in v0.21.0
func RequireChallengeEnabled ¶ added in v0.1.14
func RequireInternalAPIAuth ¶ added in v0.1.24
func RequireOperator ¶ added in v0.20.0
RequireOperator allows only identities with the exact operator platform role. Other privileged roles do not imply operator access.
func RequirePublicOrganizationManagement ¶ added in v0.1.27
func RequirePublicOrganizationManagementWithPolicy ¶ added in v0.21.0
func RequireRecentAuthenticationAPI ¶ added in v0.22.0
func RequireRecentAuthenticationUI ¶ added in v0.22.0
func RequireVerifiedEmailAPI ¶ added in v0.22.0
func RequireVerifiedEmailUI ¶ added in v0.22.0
func ReturnToWithDefault ¶ added in v0.10.0
func ReturnToWithPolicy ¶ added in v0.21.0
func SecurityHeaders ¶ added in v0.1.23
func SecurityHeaders(cfg SecurityHeadersConfig) func(http.Handler) http.Handler
Types ¶
Source Files
¶
- access_auth_with_refresh.go
- allowlist.go
- api_access_auth.go
- challange.go
- csrf.go
- email_verification.go
- htmx.go
- identity.go
- internal_api_auth.go
- logging.go
- organization_management.go
- recent_auth.go
- redirect_if_authenticated.go
- request_body.go
- require_admin.go
- require_operator.go
- return_to.go
- security_headers.go
- trusted_real_ip.go
Click to show internal directories.
Click to hide internal directories.