auth

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLoggedIn

func IsLoggedIn() bool

IsLoggedIn checks if credentials exist.

func LoadToken

func LoadToken() (string, error)

LoadToken returns a valid token, refreshing if needed.

func Login

func Login(clientID, clientSecret string) error

Login runs the full OAuth 2.0 authorization code flow.

func Logout

func Logout() error

Logout removes stored credentials.

Types

type StoredAuth

type StoredAuth struct {
	ClientID     string        `json:"client_id"`
	ClientSecret string        `json:"client_secret"`
	Token        *oauth2.Token `json:"token"`
}

StoredAuth persists OAuth credentials.

Jump to

Keyboard shortcuts

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