Revert "Remove potentially expired tokens."

This reverts commit 9b7a5fc618.

This patch casues issues for cross-repo mounts
when user doesn't have credentials for source repo
and fallback needs to happen.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
master
Tonis Tiigi 2022-02-13 21:24:23 -08:00
parent 63eff24da0
commit 9004de8804
1 changed files with 0 additions and 5 deletions

View File

@ -405,11 +405,6 @@ func (ah *authHandler) fetchToken(ctx context.Context, sm *session.Manager, g se
}
func invalidAuthorization(c auth.Challenge, responses []*http.Response) error {
lastResponse := responses[len(responses)-1]
if lastResponse.StatusCode == http.StatusUnauthorized {
return errors.Wrapf(docker.ErrInvalidAuthorization, "authorization status: %v", lastResponse.StatusCode)
}
errStr := c.Parameters["error"]
if errStr == "" {
return nil