auth

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken() (string, error)

GetToken returns the stored GitHub token

func HasToken

func HasToken() bool

HasToken checks if a token is stored

func Login

func Login() (string, error)

Login performs GitHub OAuth device flow login

func Logout

func Logout() error

Logout removes stored credentials

Types

type Status added in v0.1.3

type Status struct {
	Username     string
	Token        string
	TokenDisplay string
	StorageType  string
	IsKeyring    bool
	Scopes       []string
	Active       bool
}

Status represents the current authentication status

func GetStatus added in v0.1.3

func GetStatus() ([]*Status, error)

GetStatus returns the current authentication status

Jump to

Keyboard shortcuts

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