auth

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Credentials      Credentials
	CurrentTokenInfo TokenInfo
}

func (*Auth) EnsureAccess

func (this *Auth) EnsureAccess() (token string, err error)

type Credentials

type Credentials struct {
	AuthEndpoint     string
	AuthClientId     string
	AuthClientSecret string
	Username         string
	Password         string
}

type TokenInfo

type TokenInfo struct {
	AccessToken      string    `json:"access_token"`
	ExpiresIn        float64   `json:"expires_in"`
	RefreshExpiresIn float64   `json:"refresh_expires_in"`
	RefreshToken     string    `json:"refresh_token"`
	TokenType        string    `json:"token_type"`
	RequestTime      time.Time `json:"-"`
}

Jump to

Keyboard shortcuts

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