Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ While performing simple user authentication is pretty straightforward, performin
Docker Registry 2.0 introduced a new, token-based authentication and authorization protocol, but the server to generate them was not released.
Thus, most guides found on the internet still describe a set up with a reverse proxy performing access control.

This server fills the gap and implements the protocol described [here](https://github.com/docker/distribution/blob/main/docs/spec/auth/token.md).
This server fills the gap and implements the protocol described [here](https://distribution.github.io/distribution/spec/auth/token/).

Supported authentication methods:
* Static list of users
Expand Down
4 changes: 3 additions & 1 deletion auth_server/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ func (as *AuthServer) Authorize(ar *authRequest) ([]authzResult, error) {
return ares, nil
}

// https://github.com/docker/distribution/blob/master/docs/spec/auth/token.md#example
// CreateToken implements the CNCF Token Authentication Specification
//
// See: https://distribution.github.io/distribution/spec/auth/token/
func (as *AuthServer) CreateToken(ar *authRequest, ares []authzResult) (string, error) {
now := time.Now().Unix()
tc := &as.config.Token
Expand Down