httpauth

package
v1.0.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2018 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

type Authorizer struct {
	// contains filtered or unexported fields
}

An Authorizer is used to authorize HTTP requests.

func New

func New(o *bakery.Oven, a *auth.Authorizer) *Authorizer

New creates a new Authorizer for authorizing HTTP requests made to the identity server. The given oven is used to make new macaroons; the given authorizer is used as the underlying authorizer.

func (*Authorizer) Auth

func (a *Authorizer) Auth(ctx context.Context, req *http.Request, ops ...bakery.Op) (*identchecker.AuthInfo, error)

Auth checks that client making the given request is authorized to perform the given operations. It may return an httpbakery error when further checks are required, or params.ErrUnauthorized if the user is authenticated but does not have the required authorization.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL