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, timeout time.Duration) *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.
Click to show internal directories.
Click to hide internal directories.