Versions in this module Expand all Collapse all v1 v1.1.0 Aug 24, 2023 Changes in this version + type Authentication struct + Database *Database + OAuth *OAuth + Passwordless *Passwordless + func New(ctx context.Context, domain string, options ...Option) (*Authentication, error) + func (a *Authentication) Do(req *http.Request) (*http.Response, error) + func (a *Authentication) NewFormRequest(ctx context.Context, method, uri string, payload url.Values, ...) (*http.Request, error) + func (a *Authentication) NewRequest(ctx context.Context, method, uri string, payload interface{}, ...) (*http.Request, error) + func (a *Authentication) Request(ctx context.Context, method, uri string, payload interface{}, resp interface{}, ...) error + func (a *Authentication) URI(path ...string) string + func (a *Authentication) UserInfo(ctx context.Context, accessToken string, opts ...RequestOption) (user *UserInfoResponse, err error) + type Database manager + func (d *Database) ChangePassword(ctx context.Context, params database.ChangePasswordRequest, ...) (string, error) + func (d *Database) Signup(ctx context.Context, params database.SignupRequest, opts ...RequestOption) (r *database.SignupResponse, err error) + type OAuth manager + func (o *OAuth) LoginWithAuthCode(ctx context.Context, body oauth.LoginWithAuthCodeRequest, ...) (t *oauth.TokenSet, err error) + func (o *OAuth) LoginWithAuthCodeWithPKCE(ctx context.Context, body oauth.LoginWithAuthCodeWithPKCERequest, ...) (t *oauth.TokenSet, err error) + func (o *OAuth) LoginWithClientCredentials(ctx context.Context, body oauth.LoginWithClientCredentialsRequest, ...) (t *oauth.TokenSet, err error) + func (o *OAuth) LoginWithGrant(ctx context.Context, grantType string, body url.Values, ...) (t *oauth.TokenSet, err error) + func (o *OAuth) LoginWithPassword(ctx context.Context, body oauth.LoginWithPasswordRequest, ...) (t *oauth.TokenSet, err error) + func (o *OAuth) RefreshToken(ctx context.Context, body oauth.RefreshTokenRequest, ...) (t *oauth.TokenSet, err error) + func (o *OAuth) RevokeRefreshToken(ctx context.Context, body oauth.RevokeRefreshTokenRequest, ...) error + type Option func(*Authentication) + func WithAuth0ClientEnvEntry(key string, value string) Option + func WithClient(client *http.Client) Option + func WithClientAssertion(signingKey string, signingAlg string) Option + func WithClientID(clientID string) Option + func WithClientSecret(clientSecret string) Option + func WithIDTokenClockTolerance(clockTolerance time.Duration) Option + func WithIDTokenSigningAlg(alg string) Option + func WithNoAuth0ClientInfo() Option + func WithNoRetries() Option + func WithRetries(maxRetries int, statuses []int) Option + type Passwordless manager + func (p *Passwordless) LoginWithEmail(ctx context.Context, params passwordless.LoginWithEmailRequest, ...) (t *oauth.TokenSet, err error) + func (p *Passwordless) LoginWithSMS(ctx context.Context, params passwordless.LoginWithSMSRequest, ...) (t *oauth.TokenSet, err error) + func (p *Passwordless) SendEmail(ctx context.Context, params passwordless.SendEmailRequest, ...) (r *passwordless.SendEmailResponse, err error) + func (p *Passwordless) SendSMS(ctx context.Context, params passwordless.SendSMSRequest, opts ...RequestOption) (r *passwordless.SendSMSResponse, err error) + type RequestOption interface + func Header(key, value string) RequestOption + type UserAddress struct + Country string + Formatted string + Locality string + PostalCode string + Region string + StreetAddress string + type UserInfoResponse struct + AdditionalClaims map[string]interface{} + Address *UserAddress + Birthdate string + Email string + EmailVerified bool + FamilyName string + Gender string + GivenName string + Locale string + MiddleName string + Name string + Nickname string + PhoneNumber string + PhoneNumberVerified bool + Picture string + PreferredUsername string + Profile string + Sub string + UpdatedAt *time.Time + Website string + ZoneInformation string + func (u *UserInfoResponse) UnmarshalJSON(b []byte) error