credentials

package
v0.5.38 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLaceworkAuth

func ConfigureLaceworkAuth(cfg *api.Config) error

func GetDomain

func GetDomain(account string) string

Types

type Credentials

type Credentials map[string]*ProfileCredentials

func Load

func Load() Credentials

func (Credentials) Find

func (c Credentials) Find(profileName string) *ProfileCredentials

func (Credentials) Save

func (c Credentials) Save() error

type ProfileCredentials

type ProfileCredentials struct {
	Token     string    `json:"token"`
	ExpiresAt time.Time `json:"expiresAt"`
}

func (*ProfileCredentials) IsNearExpiration

func (p *ProfileCredentials) IsNearExpiration() bool

func (*ProfileCredentials) RefreshToken

func (p *ProfileCredentials) RefreshToken(domain string, keyID string, secretKey string) error

Jump to

Keyboard shortcuts

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