Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerWrapper ¶
type HandlerWrapper struct { common.HTTPHandler // contains filtered or unexported fields }
HandlerWrapper wraps an existing HTTP handler and performs bearer token authorization. If authorized then the wrapped handler is invoked.
func NewHandlerWrapper ¶
func NewHandlerWrapper(cfg Config, handler common.HTTPHandler) *HandlerWrapper
NewHandlerWrapper returns a handler that first performs bearer token authorization and, if authorized, invokes the wrapped handler.
func (*HandlerWrapper) Handler ¶
func (h *HandlerWrapper) Handler() common.HTTPRequestHandler
Handler returns the 'wrapper' handler.
type TokenVerifier ¶
type TokenVerifier struct { Config // contains filtered or unexported fields }
TokenVerifier authorizes requests with bearer tokens.
func NewTokenVerifier ¶
func NewTokenVerifier(cfg Config, endpoint, method string) *TokenVerifier
NewTokenVerifier returns a verifier that performs bearer token authorization.
Click to show internal directories.
Click to hide internal directories.