auth

package
v0.1.77 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClientOptions added in v0.1.72

func BuildClientOptions(workspace string, credentials blaxel.Credentials) []option.RequestOption

BuildClientOptions builds request options from credentials

func ListWorkspaces added in v0.1.72

func ListWorkspaces(credentials blaxel.Credentials) ([]blaxel.Workspace, error)

ListWorkspaces lists all workspaces for the given credentials

func LoginApiKey

func LoginApiKey(workspace string)

func LoginClientCredentials

func LoginClientCredentials(workspace string, clientCredentials string)

func LoginDevice

func LoginDevice(workspace string)

func ResetClientFactory added in v0.1.72

func ResetClientFactory()

ResetClientFactory resets to the default client factory

func SetClientFactory added in v0.1.72

func SetClientFactory(factory ClientFactory)

SetClientFactory allows setting a custom client factory for testing

func ValidateWorkspace added in v0.1.72

func ValidateWorkspace(workspace string, credentials blaxel.Credentials) error

ValidateWorkspace validates workspace credentials

Types

type AuthErrorResponse added in v0.1.72

type AuthErrorResponse struct {
	Error            string `json:"error"`
	ErrorDescription string `json:"error_description"`
}

AuthErrorResponse represents an error response from auth

type ClientFactory added in v0.1.72

type ClientFactory func(opts ...option.RequestOption) WorkspaceLister

ClientFactory creates clients for workspace operations

type DeviceLogin added in v0.1.72

type DeviceLogin struct {
	ClientID string `json:"client_id"`
	Scope    string `json:"scope"`
}

DeviceLogin represents a device login request

type DeviceLoginFinalizeRequest added in v0.1.72

type DeviceLoginFinalizeRequest struct {
	GrantType  string `json:"grant_type"`
	ClientID   string `json:"client_id"`
	DeviceCode string `json:"device_code"`
}

DeviceLoginFinalizeRequest represents a device login finalize request

type DeviceLoginFinalizeResponse added in v0.1.72

type DeviceLoginFinalizeResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
	ExpiresIn    int    `json:"expires_in"`
	TokenType    string `json:"token_type"`
}

DeviceLoginFinalizeResponse represents the response from device login finalize

type DeviceLoginResponse added in v0.1.72

type DeviceLoginResponse struct {
	DeviceCode              string `json:"device_code"`
	UserCode                string `json:"user_code"`
	VerificationURI         string `json:"verification_uri"`
	VerificationURIComplete string `json:"verification_uri_complete"`
	ExpiresIn               int    `json:"expires_in"`
	Interval                int    `json:"interval"`
}

DeviceLoginResponse represents the response from device login

type WorkspaceLister added in v0.1.72

type WorkspaceLister interface {
	List(ctx context.Context, opts ...option.RequestOption) (*[]blaxel.Workspace, error)
}

WorkspaceLister interface for listing workspaces (allows mocking)

Jump to

Keyboard shortcuts

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