auth0

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() *schema.Provider

func TfLogJson added in v1.0.0

func TfLogJson(context string, boxed interface{})

func TfLogString added in v1.0.0

func TfLogString(context string, message string)

Types

type Api added in v0.4.0

type Api struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	Identifier string `json:"identifier,omitempty"`
}

type ApiRequest added in v0.4.0

type ApiRequest struct {
	Name       string `json:"name,omitempty"`
	Identifier string `json:"identifier,omitempty"`
}

type AuthClient

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

func NewClient

func NewClient(clientId string, clientSecret string, config *Config) (*AuthClient, error)

func (*AuthClient) CreateApi added in v0.4.0

func (authClient *AuthClient) CreateApi(apiRequest *ApiRequest) (*Api, error)

func (*AuthClient) CreateClient added in v0.4.0

func (authClient *AuthClient) CreateClient(clientRequest *ClientRequest) (*Client, error)

func (*AuthClient) CreateClientGrant added in v0.4.0

func (authClient *AuthClient) CreateClientGrant(clientGrantRequest *ClientGrantRequest) (*ClientGrant, error)

func (*AuthClient) CreateUser

func (authClient *AuthClient) CreateUser(userRequest *UserRequest) (*User, error)

func (*AuthClient) DeleteApiById added in v0.4.0

func (authClient *AuthClient) DeleteApiById(id string) error

func (*AuthClient) DeleteClientById added in v0.4.0

func (authClient *AuthClient) DeleteClientById(id string) error

func (*AuthClient) DeleteClientGrantById added in v0.4.0

func (authClient *AuthClient) DeleteClientGrantById(id string) error

func (*AuthClient) DeleteUserById added in v0.4.0

func (authClient *AuthClient) DeleteUserById(id string) error

func (*AuthClient) GetApiById added in v0.4.0

func (authClient *AuthClient) GetApiById(id string) (*Api, error)

Api

func (*AuthClient) GetClientById added in v0.4.0

func (authClient *AuthClient) GetClientById(id string) (*Client, error)

Client

func (*AuthClient) GetClientGrantByClientIdAndAudience added in v0.4.0

func (authClient *AuthClient) GetClientGrantByClientIdAndAudience(clientId string, audience string) (*ClientGrant, error)

ClientGrant

func (*AuthClient) GetClientGrantById added in v0.5.4

func (authClient *AuthClient) GetClientGrantById(id string) (*ClientGrant, error)

GetClientGrantById retrieves a client grant based on ID.

Note that this is significantly heavier than GetClientGrantByClientIdAndAudience due to the Auth0 API's lack of ID-based retrieval.

func (*AuthClient) GetUserById

func (authClient *AuthClient) GetUserById(id string) (*User, error)

User

func (*AuthClient) UpdateApiById added in v0.4.0

func (authClient *AuthClient) UpdateApiById(id string, apiRequest *ApiRequest) (*Api, error)

func (*AuthClient) UpdateClientById added in v0.4.0

func (authClient *AuthClient) UpdateClientById(id string, clientRequest *ClientRequest) (*Client, error)

func (*AuthClient) UpdateClientGrantById added in v0.4.0

func (authClient *AuthClient) UpdateClientGrantById(id string, clientGrantRequest *ClientGrantRequest) (*ClientGrant, error)

func (*AuthClient) UpdateUserById

func (authClient *AuthClient) UpdateUserById(id string, userRequest *UserRequest) (*User, error)

type Client added in v0.4.0

type Client struct {
	ClientId                string                 `json:"client_id,omitempty"`
	ClientSecret            string                 `json:"client_secret,omitempty"`
	Name                    string                 `json:"name,omitempty"`
	ApplicationType         string                 `json:"app_type,omitempty"`
	GrantTypes              []string               `json:"grant_types,omitempty"`
	TokenEndpointAuthMethod string                 `json:"token_endpoint_auth_method,omitempty"`
	ClientMetaData          map[string]interface{} `json:"client_metadata,omitempty"`
}

type ClientGrant added in v0.4.0

type ClientGrant struct {
	Id       string   `json:"id,omitempty"`
	ClientId string   `json:"client_id,omitempty"`
	Audience string   `json:"audience,omitempty"`
	Scope    []string `json:"scope,omitempty"`
}

type ClientGrantRequest added in v0.4.0

type ClientGrantRequest struct {
	ClientId string   `json:"client_id,omitempty"`
	Audience string   `json:"audience,omitempty"`
	Scope    []string `json:"scope,omitempty"`
}

func (*ClientGrantRequest) MarshalJSON added in v0.5.2

func (cgr *ClientGrantRequest) MarshalJSON() ([]byte, error)

type ClientRequest added in v0.4.0

type ClientRequest struct {
	Name                    string                 `json:"name,omitempty"`
	ApplicationType         string                 `json:"app_type,omitempty"`
	GrantTypes              []string               `json:"grant_types,omitempty"`
	TokenEndpointAuthMethod string                 `json:"token_endpoint_auth_method,omitempty"`
	ClientMetaData          map[string]interface{} `json:"client_metadata,omitempty"`
}

type Config

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

type Identity added in v0.4.1

type Identity struct {
	Connection string `json:"connection,omitempty"`
	UserId     string `json:"user_id,omitempty"`
	Provider   string `json:"provider,omitempty"`
	IsSocial   bool   `json:"isSocial,omitempty"`
}

type LoginRequest

type LoginRequest struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	Audience     string `json:"audience"`
	GrantType    string `json:"grant_type"`
}

type LoginResponse

type LoginResponse struct {
	AccessToken      string `json:"access_token"`
	IdTokens         string `json:"id_token"`
	TokenType        string `json:"token_type"`
	Error            string `json:"error"`
	ErrorDescription string `json:"description"`
}

type User

type User struct {
	UserId        string                 `json:"user_id,omitempty"`
	Email         string                 `json:"email,omitempty"`
	Name          string                 `json:"name,omitempty"`
	UserMetaData  map[string]interface{} `json:"user_metadata,omitempty"`
	EmailVerified bool                   `json:"email_verified,omitempty"`
	Identities    []Identity             `json:"identities,omitempty"`
}

type UserRequest

type UserRequest struct {
	Connection    string                 `json:"connection,omitempty"`
	Email         string                 `json:"email,omitempty"`
	Name          string                 `json:"name,omitempty"`
	Password      string                 `json:"password,omitempty"`
	UserMetaData  map[string]interface{} `json:"user_metadata,omitempty"`
	EmailVerified bool                   `json:"email_verified,omitempty"`
}

Jump to

Keyboard shortcuts

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