auth0

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logout added in v0.4.4

func Logout(httpClient *http.Client, validConfig config.Config) error

func RevokeToken added in v0.4.4

func RevokeToken(httpClient *http.Client, workspaceURL string, refreshToken string) error

Types

type Auth0Config

type Auth0Config struct {
	Method   string `json:"method"`
	ClientID string `json:"client_id,omitempty"`
	Domain   string `json:"domain,omitempty"`
	Audience string `json:"audience,omitempty"`
}

type AuthEnvResponse

type AuthEnvResponse struct {
	Auth0    Auth0Config `json:"auth0"`
	Language string      `json:"language"`
}

func FetchAuthEnv

func FetchAuthEnv(workspaceURL string, httpClient *http.Client) (*AuthEnvResponse, error)

type DeviceCodeResponse

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

func RequestDeviceCode

func RequestDeviceCode(workspaceURL string, httpClient *http.Client, envInfo *AuthEnvResponse) (*DeviceCodeResponse, error)

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token,omitempty"`
	IDToken      string `json:"id_token,omitempty"`
	Scope        string `json:"scope"`
	ExpiresIn    int    `json:"expires_in"`
	TokenType    string `json:"token_type"`
	Error        string `json:"error,omitempty"`
	ErrorDesc    string `json:"error_description,omitempty"`
}

func PollForToken

func PollForToken(deviceCodeRes *DeviceCodeResponse, envInfo *AuthEnvResponse) (*TokenResponse, error)

func RefreshAccessToken

func RefreshAccessToken(workspaceURL string, httpClient *http.Client, refreshToken string) (*TokenResponse, error)

Jump to

Keyboard shortcuts

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