Documentation ¶
Overview ¶
Package authn implements the logic for authentication with OCI registries.
Index ¶
- func Login(hostname, user, token string) error
- func Logout(hostname string) error
- func NewClient(options ...func(*Options)) remote.Client
- func WithClientCredentials(cred *clientcredentials.Config) func(c *Options)
- func WithCredentials(cred *auth.Credential) func(c *Options)
- func WithOauth(ctx context.Context, oauth bool) func(c *Options)
- type Options
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithClientCredentials ¶
func WithClientCredentials(cred *clientcredentials.Config) func(c *Options)
WithClientCredentials sets the client ID, client secret, token URL and scopes for OAuth2.0 client.
func WithCredentials ¶
func WithCredentials(cred *auth.Credential) func(c *Options)
WithCredentials sets the credentials for the client.
Types ¶
type Options ¶
type Options struct { Ctx context.Context Credentials *auth.Credential Oauth bool ClientCredentials *clientcredentials.Config }
Options used for the HTTP client that can authenticate with auth.Credentials or via OAuth2.0 Options Credentials flow.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides credential CRUD operations.
func (*Store) Credential ¶
Credential iterates all the config files, returns the first non-empty credential in a best-effort way.
Click to show internal directories.
Click to hide internal directories.