auth0

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsExecutionFailedError

func IsExecutionFailedError(err error) bool

IsInvalidFlags asserts invalidFlagsError.

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsResourceExists

func IsResourceExists(err error) bool

IsResourceExists asserts resourceExistsError.

func Login

func Login(clientID, clientSecret, tenant string) error

func Logout

func Logout(tenant string) error

Types

type Auth0

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

func New

func New(config Config) (*Auth0, error)

func (*Auth0) CreateResourceServer

func (a0 *Auth0) CreateResourceServer(rr *ResouceServer) (*ResouceServer, error)

func (*Auth0) DeleteResourceServer

func (a0 *Auth0) DeleteResourceServer(identifier string) error

func (*Auth0) GetClient

func (a0 *Auth0) GetClient(clientID string) (*Client, error)

func (*Auth0) ResourceServerExists

func (a0 *Auth0) ResourceServerExists(identifier string) (bool, error)

func (*Auth0) UpdateClient

func (a0 *Auth0) UpdateClient(clientID string, client *Client) error

type Client

type Client struct {
	Callbacks  []string `json:"callbacks"`
	LogoutURLs []string `json:"allowed_logout_urls"`
	WebOrigins []string `json:"web_origins"`
}

type ClientCredentials

type ClientCredentials struct {
	AccessToken string `json:"access_token"`
	ExpiresIn   int    `json:"expires_in"`
}

type Config

type Config struct {
	Tenant string
}

type ResouceServer

type ResouceServer struct {
	Name                                      string `json:"name"`
	Identifier                                string `json:"identifier"`
	AllowOfflineAccess                        bool   `json:"allow_offline_access"`
	TokenLifetime                             int    `json:"token_lifetime"`
	TokenLifetimeWeb                          int    `json:"token_lifetime_for_web"`
	SigningAlgorithm                          string `json:"signing_alg"`
	SkipConsentForVerifiableFirstPartyClients bool   `json:"skip_consent_for_verifiable_first_party_clients"`
	EnforcePolicy                             bool   `json:"enforce_policies"`
}

type TokenConfig

type TokenConfig struct {
	ExpiresAt string `json:"expires_at"`
	Token     string `json:"token"`
}

Jump to

Keyboard shortcuts

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