Documentation
¶
Index ¶
- func AuthMiddleware(deps AuthDeps) app.HandlerFunc
- func AuthenticateRequest(ctx context.Context, deps AuthDeps, token string, path string) (context.Context, error)
- func CorsMiddleware(c context.Context, ctx *app.RequestContext)
- func DecryptDeviceRequest(ctx context.Context, c *app.RequestContext, secret string, ...) error
- func DeviceMiddleware(configProvider func() config.DeviceConfig, replayStore deviceauth.ReplayStore) app.HandlerFunc
- func EncryptDeviceResponse(c *app.RequestContext, secret string) error
- func LoggerMiddleware(enrichers ...requestmeta.Enricher) app.HandlerFunc
- func NotifyMiddleware(store repository.Store) app.HandlerFunc
- func OptionalAuthMiddleware(deps AuthDeps) app.HandlerFunc
- func PaymentNotifyContext(ctx context.Context, store repository.Store, platform, token string) (context.Context, error)
- func TraceMiddleware() app.HandlerFunc
- type AuthDeps
- type PaymentParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(deps AuthDeps) app.HandlerFunc
func AuthenticateRequest ¶ added in v1.2.14
func CorsMiddleware ¶
func CorsMiddleware(c context.Context, ctx *app.RequestContext)
func DecryptDeviceRequest ¶ added in v1.3.13
func DecryptDeviceRequest(ctx context.Context, c *app.RequestContext, secret string, replayStore deviceauth.ReplayStore) error
DecryptDeviceRequest accepts only authenticated envelopes. All validation completes before plaintext is installed; unsigned query parameters cannot be mixed into an authenticated body or accepted on a bodyless POST.
func DeviceMiddleware ¶ added in v1.1.8
func DeviceMiddleware(configProvider func() config.DeviceConfig, replayStore deviceauth.ReplayStore) app.HandlerFunc
func EncryptDeviceResponse ¶ added in v1.3.13
func EncryptDeviceResponse(c *app.RequestContext, secret string) error
EncryptDeviceResponse preserves the data/time format and adds a signature.
func LoggerMiddleware ¶
func LoggerMiddleware(enrichers ...requestmeta.Enricher) app.HandlerFunc
func NotifyMiddleware ¶
func NotifyMiddleware(store repository.Store) app.HandlerFunc
func OptionalAuthMiddleware ¶ added in v1.14.15
func OptionalAuthMiddleware(deps AuthDeps) app.HandlerFunc
OptionalAuthMiddleware authenticates a request when it supplies an Authorization header, while preserving anonymous access for routes that intentionally support guest checkout. Handlers on those routes must still explicitly require an authenticated user before operating on a user-owned resource.
func PaymentNotifyContext ¶ added in v1.2.14
func TraceMiddleware ¶
func TraceMiddleware() app.HandlerFunc
Types ¶
type PaymentParams ¶
Click to show internal directories.
Click to hide internal directories.