auth

package
v0.0.0-...-77c6198 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeJWT

func DecodeJWT(token string) (map[string]interface{}, error)

func DeleteToken

func DeleteToken() error

func GetTokenPath

func GetTokenPath() string

func SaveToken

func SaveToken(token *StoredToken) error

Types

type OAuthClient

type OAuthClient struct {
	// contains filtered or unexported fields
}

func NewOAuthClient

func NewOAuthClient(clientID, clientSecret string) *OAuthClient

func (*OAuthClient) Login

func (o *OAuthClient) Login() (*StoredToken, error)

type StoredToken

type StoredToken struct {
	AccessToken  string    `json:"access_token"`
	RefreshToken string    `json:"refresh_token"`
	IDToken      string    `json:"id_token"`
	TokenType    string    `json:"token_type"`
	Expiry       time.Time `json:"expiry"`
}

func LoadToken

func LoadToken() (*StoredToken, error)

Jump to

Keyboard shortcuts

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