auth

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCredentials

func DeleteCredentials(profile string) error

func OAuthFlow

func OAuthFlow(subdomain, clientID, clientSecret, scope string) (string, error)

func SaveCredentials

func SaveCredentials(profile string, pc *ProfileCredentials) error

Types

type AuthTransport

type AuthTransport struct {
	Credentials *ProfileCredentials
	Base        http.RoundTripper
}

func (*AuthTransport) RoundTrip

func (t *AuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

type Credentials

type Credentials struct {
	Profiles map[string]ProfileCredentials `json:"profiles"`
}

type ProfileCredentials

type ProfileCredentials struct {
	Method        string `json:"method"`
	Subdomain     string `json:"subdomain"`
	Email         string `json:"email,omitempty"`
	APIToken      string `json:"api_token,omitempty"`
	OAuthToken    string `json:"oauth_token,omitempty"`
	OAuthClientID string `json:"oauth_client_id,omitempty"`
}

func LoadCredentials

func LoadCredentials(profile string) (*ProfileCredentials, error)

func ResolveCredentials

func ResolveCredentials(profile string) (*ProfileCredentials, error)

Jump to

Keyboard shortcuts

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