Documentation
¶
Overview ¶
Package silly provides a simple authentication scheme that checks for the existence of an Authorization header and issues access if is present and non-empty.
This package is present as an example implementation of a minimal auth.AccessController and for testing. This is not suitable for any kind of production security.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessController ¶
type AccessController struct {
// contains filtered or unexported fields
}
AccessController provides a simple implementation of auth.AccessController that simply checks for a non-empty Authorization header. It is useful for demonstration and testing.
func (*AccessController) Authorized ¶
func (ac *AccessController) Authorized(req *http.Request, accessRecords ...auth.Access) (*auth.Grant, error)
Authorized simply checks for the existence of the authorization header, responding with a bearer challenge if it doesn't exist.
Click to show internal directories.
Click to hide internal directories.