Documentation ¶
Index ¶
Constants ¶
View Source
const ( Service = "tke" Issuer = "tke-registry-token-issuer" )
View Source
const Path = "/registry/auth"
Path is the authorization server url for distribution.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct { SecurityConfig *registryconfig.Security TokenReviewCAFile string TokenReviewPath string DomainSuffix string DefaultTenant string LoopbackConfig *restclient.Config }
Options defines the configuration of distribution auth handler.
type Token ¶
type Token struct { Token string `json:"token"` AccessToken string `json:"access_token"` ExpiresIn int `json:"expires_in"` IssuedAt string `json:"issued_at"` }
Token represents the json returned by registry token service
func MakeToken ¶ added in v1.9.1
func MakeToken(username string, access []*token.ResourceActions, expiredHours int64, privateKey libtrust.PrivateKey) (*Token, error)
makeToken makes a valid jwt token based on params.
Click to show internal directories.
Click to hide internal directories.