Documentation
¶
Index ¶
- Variables
- type Authentication
- func (authentication *Authentication) Close() error
- func (authentication *Authentication) Logout() http.HandlerFunc
- func (authentication *Authentication) Middleware() func(route http.HandlerFunc) http.HandlerFunc
- func (authentication *Authentication) SignIn() http.HandlerFunc
- func (authentication *Authentication) SignUp() http.HandlerFunc
- func (authentication *Authentication) WhoAmI() http.HandlerFunc
- type Authorization
- func (authorization *Authorization) Administrator(route http.HandlerFunc) http.HandlerFunc
- func (authorization *Authorization) Basic(route http.HandlerFunc) http.HandlerFunc
- func (authorization *Authorization) Close() error
- func (authorization *Authorization) Grant() http.HandlerFunc
- func (authorization *Authorization) Middleware(required Role) func(route http.HandlerFunc) http.HandlerFunc
- func (authorization *Authorization) Secure(route http.HandlerFunc) http.HandlerFunc
- type Error
- type ID
- type Role
- type RoleContextKey
- type UserContextKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnauthenticated = NewError("authentication required", http.StatusUnauthorized) ErrNotFound = NewError("resource not found", http.StatusNotFound) ErrUnexpected = NewError("unexpected error occurred", http.StatusInternalServerError) ErrBadRequest = NewError("bad request", http.StatusBadRequest) )
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
type Authentication struct {
// contains filtered or unexported fields
}
func NewAuthentication ¶
func (*Authentication) Close ¶
func (authentication *Authentication) Close() error
func (*Authentication) Logout ¶
func (authentication *Authentication) Logout() http.HandlerFunc
func (*Authentication) Middleware ¶
func (authentication *Authentication) Middleware() func(route http.HandlerFunc) http.HandlerFunc
func (*Authentication) SignIn ¶
func (authentication *Authentication) SignIn() http.HandlerFunc
func (*Authentication) SignUp ¶
func (authentication *Authentication) SignUp() http.HandlerFunc
func (*Authentication) WhoAmI ¶
func (authentication *Authentication) WhoAmI() http.HandlerFunc
type Authorization ¶
type Authorization struct {
// contains filtered or unexported fields
}
func NewAuthorization ¶
func (*Authorization) Administrator ¶
func (authorization *Authorization) Administrator(route http.HandlerFunc) http.HandlerFunc
func (*Authorization) Basic ¶
func (authorization *Authorization) Basic(route http.HandlerFunc) http.HandlerFunc
func (*Authorization) Close ¶
func (authorization *Authorization) Close() error
func (*Authorization) Grant ¶
func (authorization *Authorization) Grant() http.HandlerFunc
func (*Authorization) Middleware ¶
func (authorization *Authorization) Middleware(required Role) func(route http.HandlerFunc) http.HandlerFunc
func (*Authorization) Secure ¶
func (authorization *Authorization) Secure(route http.HandlerFunc) http.HandlerFunc
type Error ¶
type RoleContextKey ¶
type RoleContextKey struct{}
type UserContextKey ¶
type UserContextKey struct{}
Click to show internal directories.
Click to hide internal directories.