storage

package
v1.3.3-0...-f31c912 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	// AccessToken is the Bearer token used to access the provider's API
	AccessToken string
	// RefreshToken is used to acquire a new access token.
	RefreshToken string
	// ExpiresAt marks the end of validity period for the access token.
	// The application must use the refresh token to acquire a new access token
	// before this time.
	ExpiresAt time.Time
}

Credentials represents the short-lived OAuth2 credentials.

type Store

type Store interface {
	GetCredentials(context.Context) (*Credentials, error)
	PutCredentials(context.Context, *Credentials) error
}

Store defines the interface for persisting the short-lived OAuth2 credentials.

Jump to

Keyboard shortcuts

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