Documentation ¶
Index ¶
- Constants
- Variables
- func Cache(next http.Handler) http.Handler
- func Cors(next http.Handler) http.Handler
- func ExtractAccountUUID(opts ...account.Option) func(http.Handler) http.Handler
- func Logger(logger log.Logger) func(http.Handler) http.Handler
- func OpenIDConnect(opts ...ocisoidc.Option) func(http.Handler) http.Handler
- func RealIP(next http.Handler) http.Handler
- func RequestID(next http.Handler) http.Handler
- func Secure(next http.Handler) http.Handler
- func Static(root string, fs http.FileSystem) func(http.Handler) http.Handler
- func Token(token string) func(http.Handler) http.Handler
- func Trace(next http.Handler) http.Handler
- func Version(name, version string) func(http.Handler) http.Handler
Constants ¶
View Source
const AccountID string = "Account-Id"
AccountID serves as key for the account uuid in the context
Variables ¶
View Source
var ( // ErrInvalidToken is returned when the request token is invalid. ErrInvalidToken = errors.New("invalid or missing token") )
View Source
var UUIDKey struct{}
UUIDKey serves as key for the account uuid in the context Deprecated: UUIDKey exists for compatibility reasons. Use AccountID instead.
Functions ¶
func ExtractAccountUUID ¶ added in v2.3.0
ExtractAccountUUID provides a middleware to extract the account uuid from the x-access-token header value and write it to the context. If there is no x-access-token the middleware is omitted.
func OpenIDConnect ¶
OpenIDConnect provides a middleware to check access secured by a static token.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.