1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
package registry
// Option is the registry token authorization server configuration options
type Option struct {
// an Authorizer implementation to authorize registry users
Authorizer Authorizer
// an Authenticator implementation to authenticate registry users
Authenticator Authenticator
// a pluggable tokenGenerator
TokenGenerator TokenGenerator
// .crt & .key file to sign JWT tokens
Certfile string
Keyfile string
// token expiration time
TokenExpiration int64
// token issuer specified in docker registry configuration file
TokenIssuer string
}
type TokenOption struct {
Expire int64
Issuer string
}
// AuthorizationRequest is the authorization request data
type AuthorizationRequest struct {
Account string
Service string
Type string
Name string
IP string
Actions []string
}
|