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 *app.RequestContext, encryptionKey string) bool
- func DeviceMiddleware(configProvider func() config.DeviceConfig) app.HandlerFunc
- func EncryptDeviceResponse(ctx *app.RequestContext, encryptionKey string)
- 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 *app.RequestContext, encryptionKey string) bool
DecryptDeviceRequest decrypts device-login query and request-body payloads in place.
func DeviceMiddleware ¶ added in v1.1.8
func DeviceMiddleware(configProvider func() config.DeviceConfig) app.HandlerFunc
func EncryptDeviceResponse ¶ added in v1.3.13
func EncryptDeviceResponse(ctx *app.RequestContext, encryptionKey string)
EncryptDeviceResponse encrypts the top-level data field of a device-login response in place.
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.