authconfig

package
v0.15.3 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigVersion           = 1
	EnvAuthIssuerURL        = "BOLTZ_COMPUTE_AUTH_ISSUER_URL"
	EnvAuthClientID         = "BOLTZ_COMPUTE_AUTH_CLIENT_ID"
	EnvAuthScope            = "BOLTZ_COMPUTE_AUTH_SCOPE"
	EnvAuthAudience         = "BOLTZ_COMPUTE_AUTH_AUDIENCE"
	EnvAuthAuthorizationURL = "BOLTZ_COMPUTE_AUTH_AUTHORIZATION_URL"
	EnvAuthTokenURL         = "BOLTZ_COMPUTE_AUTH_TOKEN_URL"
	EnvAuthUserInfoURL      = "BOLTZ_COMPUTE_AUTH_USERINFO_URL"
	EnvAuthRevocationURL    = "BOLTZ_COMPUTE_AUTH_REVOCATION_URL"
	EnvOrg                  = "BOLTZ_COMPUTE_ORG"
	EnvListenPort           = "BOLTZ_COMPUTE_LISTEN_PORT"
)
View Source
const (
	DefaultIssuerURL  = "https://lab.boltz.bio"
	DefaultClientID   = "boltz-cli"
	DefaultAudience   = "boltz-compute-api"
	DefaultListenPort = 8421
	DefaultScope      = "compute:run"
)

Variables

View Source
var DefaultScopes = []string{"openid", "offline_access", "profile", "email"}

Functions

func SaveProfile

func SaveProfile(resolved Resolved) error

func SaveSelectedOrg

func SaveSelectedOrg(org string) error

Types

type FileConfig

type FileConfig struct {
	Version          int      `yaml:"version,omitempty"`
	IssuerURL        string   `yaml:"issuer_url,omitempty"`
	ClientID         string   `yaml:"client_id,omitempty"`
	Scopes           []string `yaml:"scopes,omitempty"`
	Audience         string   `yaml:"audience,omitempty"`
	AuthorizationURL string   `yaml:"authorization_url,omitempty"`
	TokenURL         string   `yaml:"token_url,omitempty"`
	UserInfoURL      string   `yaml:"userinfo_url,omitempty"`
	RevocationURL    string   `yaml:"revocation_url,omitempty"`
	SelectedOrg      string   `yaml:"selected_org,omitempty"`
}

func Load

func Load() (FileConfig, error)

type Resolved

type Resolved struct {
	APIKey           string
	IssuerURL        string
	ClientID         string
	Scopes           []string
	Audience         string
	AuthorizationURL string
	TokenURL         string
	UserInfoURL      string
	RevocationURL    string
	SelectedOrg      string
	ListenPort       int
	Sources          Sources
}

func Resolve

func Resolve(cmd *cli.Command) (Resolved, error)

type Source

type Source string
const (
	SourceUnset        Source = "unset"
	SourceRuntime      Source = "runtime"
	SourceConfig       Source = "config"
	SourceDefault      Source = "default"
	SourceSessionCache Source = "session_cache"
	SourceKeyring      Source = "keyring"
	SourceFile         Source = "file"
)

type Sources

type Sources struct {
	APIKey           Source
	IssuerURL        Source
	ClientID         Source
	Scopes           Source
	Audience         Source
	AuthorizationURL Source
	TokenURL         Source
	UserInfoURL      Source
	RevocationURL    Source
	SelectedOrg      Source
	ListenPort       Source
}

Jump to

Keyboard shortcuts

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