authentication

package
v0.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

Authenticator logs on docker Hub and retrieves a DockerScanID if the one stored locally has expired

func NewAuthenticator

func NewAuthenticator(jwks jose.JSONWebKeySet, apiHubBaseURL string) *Authenticator

NewAuthenticator returns an Authenticator configured to run against Docker Hub prod or staging

func (*Authenticator) GetToken

func (a *Authenticator) GetToken(hubAuthConfig types.AuthConfig) (string, error)

GetToken checks the local DockerScanID content for expiry, if expired it negotiates a new one on Docker Hub.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL