auth

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 10 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 {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`

	AccessToken  string    `json:"access_token"`
	RefreshToken string    `json:"refresh_token"`
	ExpiresAt    time.Time `json:"expires_at"`
}

func Load

func Load() (*Auth, error)

func New

func New(clientId, clientSecret string) *Auth

func (*Auth) GetAuthUrl

func (a *Auth) GetAuthUrl(port int) string

func (*Auth) GetToken

func (a *Auth) GetToken(ctx context.Context) (string, error)

func (*Auth) Login

func (a *Auth) Login(ctx context.Context, port int) error

func (*Auth) Write

func (a *Auth) Write() error

Jump to

Keyboard shortcuts

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