This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle multiple scopes in token requests
According to the official spec the scope parameter can be passed more than once: "This query parameter should be specified multiple times ifthere is more than one scope entry from the WWW-Authenticate header". At least the latest docker daemon 1.10.0 does use multiple scope parameters in a single token request (e.g. when pushing multiple tags in parallel). Additionaly this commit changes the token endpoint to not return "401 Unauthorized" on any kind of authorization error, only authentication errors should return 401 errors. This also conforms with the spec: "If the client only has a subset of the requested access it must not be considered an error as it is not the responsibility of the token server to indicate authorization errors as part of this workflow." Signed-off-by: Fabian Ruff <fabian.ruff@sap.com>
- Loading branch information
Showing
4 changed files
with
103 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters