auth

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2025 License: Unlicense Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthAPI added in v1.2.0

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

AuthAPI A representation of the auth namespace for the MTGJSON API

func New

func New(baseUrl string, client *client.HTTPClient) *AuthAPI

New Create a new instance of the AuthAPI struct

func (*AuthAPI) BaseURL added in v1.2.0

func (api *AuthAPI) BaseURL() string

BaseURL - Returns the baseUrl with its associating endpoint attached to it, used for making HTTP requests

func (*AuthAPI) Client added in v1.2.0

func (api *AuthAPI) Client() *client.HTTPClient

Client - Returns a pointer to the client.HTTPClient structure that is used for HTTP requests

func (*AuthAPI) Login added in v1.2.0

func (api *AuthAPI) Login(email string, password string) (*oauth.TokenSet, error)

Login Exchange user credentials for an oauth.TokenSet

func (*AuthAPI) RegisterUser added in v1.2.0

func (api *AuthAPI) RegisterUser(email string, username string, password string) (*apiModels.APIResponse, error)

RegisterUser Register a new user with Auth0 and store there user model within the MongoDB database

func (*AuthAPI) ResetUserPassword added in v1.2.0

func (api *AuthAPI) ResetUserPassword(email string) (*apiModels.APIResponse, error)

ResetUserPassword Send a reset password email to a specified user account

Jump to

Keyboard shortcuts

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