Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(channelID string, tokens []string, handler common.HTTPHandler) common.HTTPHandler
New returns a new auth handler
Types ¶
type Config ¶
type Config struct { // ReadTokens contains a set of names of tokens for authorizing read requests ReadTokens []string // WriteTokens contains a set of names of tokens for authorizing write requests WriteTokens []string }
Config contains the config for endpoint authorization
type Handler ¶
type Handler struct { common.HTTPHandler // contains filtered or unexported fields }
Handler authorizes the request before delegating to the target handler
func (*Handler) Handler ¶
func (h *Handler) Handler() common.HTTPRequestHandler
Handler returns the HTTP request handler
Click to show internal directories.
Click to hide internal directories.