Documentation
¶
Index ¶
- type Auth0Client
- func (client *Auth0Client) Close()
- func (client *Auth0Client) GetUser(email string) (*schema.UserData, error)
- func (client *Auth0Client) GetUserById(id string) (*schema.UserData, error)
- func (client *Auth0Client) GetUserInfo(authHeader string) (*schema.UserData, error)
- func (client *Auth0Client) Start() error
- func (client *Auth0Client) UpdateUser(id string, user *schema.UserUpdate) error
- type ClientInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth0Client ¶
type Auth0Client struct {
// contains filtered or unexported fields
}
Auth0 api client object Used to communicate with Auth0 management api using machine credentials
func NewAuth0Client ¶
func NewAuth0Client(logger *log.Logger) *Auth0Client
Create a new client from environment variables requires AUTH0_URL, AUTH0_SECRET and AUTH0_CLIENT_ID to be set
func (*Auth0Client) Close ¶
func (client *Auth0Client) Close()
func (*Auth0Client) GetUser ¶
func (client *Auth0Client) GetUser(email string) (*schema.UserData, error)
Get user info from Auth0 using the email as key
func (*Auth0Client) GetUserById ¶
func (client *Auth0Client) GetUserById(id string) (*schema.UserData, error)
Get user info from Auth0 using its user id as key
func (*Auth0Client) GetUserInfo ¶ added in v1.9.5
func (client *Auth0Client) GetUserInfo(authHeader string) (*schema.UserData, error)
Retrieve user information from auth0 based on its access token
func (*Auth0Client) Start ¶
func (client *Auth0Client) Start() error
Get an auth token and initiate the token refresh loop
func (*Auth0Client) UpdateUser ¶
func (client *Auth0Client) UpdateUser(id string, user *schema.UserUpdate) error
Update a user on Auth0 Only the Email and Password can be udated for now Updating both email and password at the same time will throw an error (not accepted by Auth0)
Click to show internal directories.
Click to hide internal directories.