From d5010a12df1706a8c169751845d1209cad70da2e Mon Sep 17 00:00:00 2001 From: "Hsing-Yu (David) Chen" Date: Thu, 8 Dec 2022 13:24:48 -0800 Subject: [PATCH] docs: Authorizer.Authorize could return ErrUnexpectedStatus Signed-off-by: Hsing-Yu (David) Chen --- remotes/docker/resolver.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/remotes/docker/resolver.go b/remotes/docker/resolver.go index b69d46c02..9fa4b41df 100644 --- a/remotes/docker/resolver.go +++ b/remotes/docker/resolver.go @@ -71,6 +71,9 @@ type Authorizer interface { // unmodified. It may also add an `Authorization` header as // "bearer " // "basic " + // + // 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 // AddResponses adds a 401 response for the authorizer to consider when