auth

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OAuthLogin

func OAuthLogin(name, giteaURL string) error

OAuthLogin performs an OAuth2 PKCE login flow to authorize the CLI

func OAuthLoginWithFullOptions

func OAuthLoginWithFullOptions(opts OAuthOptions) error

OAuthLoginWithFullOptions performs an OAuth2 PKCE login flow with full options control

func OAuthLoginWithOptions

func OAuthLoginWithOptions(name, giteaURL string, insecure bool) error

OAuthLoginWithOptions performs an OAuth2 PKCE login flow with additional options

func ReauthenticateLogin added in v0.12.0

func ReauthenticateLogin(login *config.Login) error

ReauthenticateLogin performs a full browser-based OAuth flow to get new tokens for an existing login. This is used when the refresh token is expired or invalid.

func RefreshAccessToken

func RefreshAccessToken(login *config.Login) error

RefreshAccessToken manually renews an access token using the refresh token. This is used by the "tea login oauth-refresh" command for explicit token refresh. For automatic threshold-based refresh, use login.Client() which handles it internally.

Types

type OAuthOptions

type OAuthOptions struct {
	Name        string
	URL         string
	Insecure    bool
	ClientID    string
	RedirectURL string
	Port        int
}

OAuthOptions contains options for the OAuth login flow

Jump to

Keyboard shortcuts

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