Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BearerAuthRequired ¶
type BearerAuthRequired struct{}
BearerAuthRequired indicates that you must provide a Bearer token in the Authorization header.
func (BearerAuthRequired) Code ¶
func (e BearerAuthRequired) Code() string
Code returns "auth_required"
func (BearerAuthRequired) Message ¶
func (e BearerAuthRequired) Message() string
Message returns a human-readable description of the error.
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(secret []byte) (*Controller, error)
func (*Controller) CreateUser ¶
func (c *Controller) CreateUser(ctx context.Context, w http.ResponseWriter, r *http.Request)
func (*Controller) GetUser ¶
func (c *Controller) GetUser(ctx context.Context, w http.ResponseWriter, r *http.Request)
func (*Controller) WrapC ¶
func (c *Controller) WrapC(inner goji.Handler) goji.Handler
WrapC wraps a handler and only passes requests with valid Bearer authorization.
Click to show internal directories.
Click to hide internal directories.