auth

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistryTransport

type RegistryTransport struct {
	Base  http.RoundTripper
	Token *Token
}

func (*RegistryTransport) RoundTrip

func (t *RegistryTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Token

type Token struct {
	// Type is "Basic" or "Bearer"
	Type TokenType
	// Value...
	Value string
}

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"`
}

type TokenType

type TokenType string

TokenType is HTTP Authorization Header's token type

const (
	// TokenTypeBasic is Basic type token
	TokenTypeBasic TokenType = "Basic"
	// TokenTypeBearer is Bearer type token
	TokenTypeBearer TokenType = "Bearer"
)

Jump to

Keyboard shortcuts

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