auth

package
v0.0.0-...-90bd438 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(auth Auth) *authRouter

NewRouter initializes a new auth router

Types

type Auth

type Auth struct {
	User     string // required
	Password string // required
	Secret   string // required
}

func (Auth) IsValid

func (a Auth) IsValid() bool

type TokenResponse

type TokenResponse struct {
	Token        string    `json:"token"`
	AccessToken  string    `json:"access_token"`
	ExpiresIn    int       `json:"expires_in"`
	IssuedAt     time.Time `json:"issued_at"`
	RefreshToken string    `json:"refresh_token"`
}

ref. https://docs.docker.com/registry/spec/auth/token/#requesting-a-token

Jump to

Keyboard shortcuts

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