Documentation ¶
Index ¶
- func AuthenticateUser(email, password string) (interface{}, error)
- func CreateUser(params map[string]interface{}) (interface{}, error)
- func DeleteUser(auth0UserID string) (interface{}, error)
- func ExportUsers() ([]interface{}, error)
- func GetJWKs() (map[string]interface{}, error)
- func GetJob(auth0JobID string) (interface{}, error)
- func GetUser(auth0UserID string) (interface{}, error)
- func GetUserByEmail(email string) (interface{}, error)
- func RequireAuth0()
- func UpdateUser(auth0UserID string, params map[string]interface{}) (interface{}, error)
- type Auth0APIClient
- func (c *Auth0APIClient) Delete(uri string) (status int, response interface{}, err error)
- func (c *Auth0APIClient) DeleteWithTLSClientConfig(uri string, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Auth0APIClient) Get(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Auth0APIClient) GetWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Auth0APIClient) Patch(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Auth0APIClient) Post(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Auth0APIClient) PostMultipartFormData(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Auth0APIClient) PostMultipartFormDataWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Auth0APIClient) PostWWWFormURLEncoded(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Auth0APIClient) PostWWWFormURLEncodedWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Auth0APIClient) PostWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- func (c *Auth0APIClient) Put(uri string, params map[string]interface{}) (status int, response interface{}, err error)
- func (c *Auth0APIClient) PutWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
- type Auth0OAuthTokenResponse
- type JSONWebKey
- type JWTKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticateUser ¶
AuthenticateUser authenticates an auth0 user
func CreateUser ¶
CreateUser creates an auth0 user
func DeleteUser ¶
DeleteUser deletes an auth0 user
func ExportUsers ¶
func ExportUsers() ([]interface{}, error)
ExportUsers returns an export of all auth0 users
func GetUserByEmail ¶
GetUserByEmail returns an auth0 user by email address
func RequireAuth0 ¶
func RequireAuth0()
RequireAuth0 reads the Auth0 configuration from the environment
func UpdateUser ¶
UpdateUser updates an auth0 user
Types ¶
type Auth0APIClient ¶
type Auth0APIClient struct { Host string OAuthAccessTokenURL string Path string Scheme string Token *string TokenExpiresAt *time.Time Username *string Password *string }
Auth0APIClient is a generic base class for calling a REST API; when a token is configured on an Auth0APIClient instance it will be provided as a bearer authorization header; when a username and password are configured on an Auth0APIClient instance, they will be used for HTTP basic authorization but will be passed as the Authorization header instead of as part of the URL itself. When a token is confgiured on an Auth0APIClient instance, the username and password supplied for basic auth are currently discarded.
func NewAuth0APIClient ¶
func NewAuth0APIClient() (*Auth0APIClient, error)
NewAuth0APIClient initializes a Auth0APIClient to interact with the Auth0 API using the environment-configured Auth0 API credentials.
func NewAuth0APIClientWithPath ¶
func NewAuth0APIClientWithPath(path string) (*Auth0APIClient, error)
NewAuth0APIClientWithPath initializes a Auth0APIClient to interact with the Auth0 API using the environment-configured Auth0 API credentials and given path.
func (*Auth0APIClient) Delete ¶
func (c *Auth0APIClient) Delete(uri string) (status int, response interface{}, err error)
Delete constructs and synchronously sends an API DELETE request
func (*Auth0APIClient) DeleteWithTLSClientConfig ¶
func (c *Auth0APIClient) DeleteWithTLSClientConfig(uri string, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
DeleteWithTLSClientConfig constructs and synchronously sends an API DELETE request
func (*Auth0APIClient) Get ¶
func (c *Auth0APIClient) Get(uri string, params map[string]interface{}) (status int, response interface{}, err error)
Get constructs and synchronously sends an API GET request
func (*Auth0APIClient) GetWithTLSClientConfig ¶
func (c *Auth0APIClient) GetWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
GetWithTLSClientConfig constructs and synchronously sends an API GET request
func (*Auth0APIClient) Patch ¶
func (c *Auth0APIClient) Patch(uri string, params map[string]interface{}) (status int, response interface{}, err error)
Patch constructs and synchronously sends an API PATCH request
func (*Auth0APIClient) Post ¶
func (c *Auth0APIClient) Post(uri string, params map[string]interface{}) (status int, response interface{}, err error)
Post constructs and synchronously sends an API POST request
func (*Auth0APIClient) PostMultipartFormData ¶
func (c *Auth0APIClient) PostMultipartFormData(uri string, params map[string]interface{}) (status int, response interface{}, err error)
PostMultipartFormData constructs and synchronously sends an API POST request using multipart/form-data as the content-type
func (*Auth0APIClient) PostMultipartFormDataWithTLSClientConfig ¶
func (c *Auth0APIClient) PostMultipartFormDataWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PostMultipartFormDataWithTLSClientConfig constructs and synchronously sends an API POST request using multipart/form-data as the content-type
func (*Auth0APIClient) PostWWWFormURLEncoded ¶
func (c *Auth0APIClient) PostWWWFormURLEncoded(uri string, params map[string]interface{}) (status int, response interface{}, err error)
PostWWWFormURLEncoded constructs and synchronously sends an API POST request using application/x-www-form-urlencoded as the content-type
func (*Auth0APIClient) PostWWWFormURLEncodedWithTLSClientConfig ¶
func (c *Auth0APIClient) PostWWWFormURLEncodedWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PostWWWFormURLEncodedWithTLSClientConfig constructs and synchronously sends an API POST request using application/x-www-form-urlencoded as the content-type
func (*Auth0APIClient) PostWithTLSClientConfig ¶
func (c *Auth0APIClient) PostWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PostWithTLSClientConfig constructs and synchronously sends an API POST request
func (*Auth0APIClient) Put ¶
func (c *Auth0APIClient) Put(uri string, params map[string]interface{}) (status int, response interface{}, err error)
Put constructs and synchronously sends an API PUT request
func (*Auth0APIClient) PutWithTLSClientConfig ¶
func (c *Auth0APIClient) PutWithTLSClientConfig(uri string, params map[string]interface{}, tlsClientConfig *tls.Config) (status int, response interface{}, err error)
PutWithTLSClientConfig constructs and synchronously sends an API PUT request