auth0

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	Kind             string `json:"error"` // renamed to avoid Error() clash
	ErrorDescription string `json:"error_description"`
}

func (*APIError) Error

func (e *APIError) Error() string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(config api.AuthMethodAuth0Details) (*Client, error)

func (*Client) GetDeviceCode

func (c *Client) GetDeviceCode(ctx context.Context, scope string) (DeviceCodeResponse, error)

func (*Client) PollDeviceCodeTokens

func (c *Client) PollDeviceCodeTokens(ctx context.Context, dcr DeviceCodeResponse) (Tokens, error)

func (*Client) RefreshToken

func (c *Client) RefreshToken(ctx context.Context, refreshToken string) (Tokens, error)

type Credentials

type Credentials struct {
	Version  int               `json:"version"`
	Services map[string]Tokens `json:"services"`
}

func (*Credentials) AddTokens

func (c *Credentials) AddTokens(uri string, tokens Tokens)

func (*Credentials) RemoveTokens

func (c *Credentials) RemoveTokens(uri string)

func (*Credentials) Tokens

func (c *Credentials) Tokens(uri string) *Tokens

type DeviceCodeResponse

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

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(path string) *Store

func (Store) RemoveTokens

func (s Store) RemoveTokens(uri string) error

func (Store) SetTokens

func (s Store) SetTokens(uri string, tokens Tokens) error

func (Store) Tokens

func (s Store) Tokens(uri string) (*Tokens, error)

type Tokens

type Tokens struct {
	Access     string    `json:"access"`
	Expiration time.Time `json:"expiration"`
	ID         string    `json:"id"`
	Refresh    string    `json:"refresh"`
}

Jump to

Keyboard shortcuts

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