docs: Authorizer.Authorize could return ErrUnexpectedStatus
Signed-off-by: Hsing-Yu (David) Chen <davidhsingyuchen@gmail.com>
This commit is contained in:
parent
e1abaeb386
commit
d5010a12df
@ -71,6 +71,9 @@ type Authorizer interface {
|
|||||||
// unmodified. It may also add an `Authorization` header as
|
// unmodified. It may also add an `Authorization` header as
|
||||||
// "bearer <some bearer token>"
|
// "bearer <some bearer token>"
|
||||||
// "basic <base64 encoded credentials>"
|
// "basic <base64 encoded credentials>"
|
||||||
|
//
|
||||||
|
// It may return remotes/errors.ErrUnexpectedStatus, which for example,
|
||||||
|
// can be used by the caller to find out the status code returned by the registry.
|
||||||
Authorize(context.Context, *http.Request) error
|
Authorize(context.Context, *http.Request) error
|
||||||
|
|
||||||
// AddResponses adds a 401 response for the authorizer to consider when
|
// AddResponses adds a 401 response for the authorizer to consider when
|
||||||
|
Loading…
Reference in New Issue
Block a user