management

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 20 Imported by: 39

Documentation

Index

Examples

Constants

View Source
const (
	// ActionTriggerPostLogin constant.
	ActionTriggerPostLogin string = "post-login"
	// ActionTriggerClientCredentials constant.
	ActionTriggerClientCredentials string = "client-credentials"
)
View Source
const (
	// ActionStatusPending constant.
	ActionStatusPending string = "pending"
	// ActionStatusBuilding constant.
	ActionStatusBuilding string = "building"
	// ActionStatusPackaged constant.
	ActionStatusPackaged string = "packaged"
	// ActionStatusBuilt constant.
	ActionStatusBuilt string = "built"
	// ActionStatusRetrying constant.
	ActionStatusRetrying string = "retrying"
	// ActionStatusFailed constant.
	ActionStatusFailed string = "failed"
)
View Source
const (
	// ActionBindingReferenceByName constant.
	ActionBindingReferenceByName string = "action_name"
	// ActionBindingReferenceByID constant.
	ActionBindingReferenceByID string = "action_id"
)
View Source
const (
	// ConnectionStrategyAuth0 constant.
	ConnectionStrategyAuth0 = "auth0"
	// ConnectionStrategyGoogleOAuth2 constant.
	ConnectionStrategyGoogleOAuth2 = "google-oauth2"
	// ConnectionStrategyFacebook constant.
	ConnectionStrategyFacebook = "facebook"
	// ConnectionStrategyApple constant.
	ConnectionStrategyApple = "apple"
	// ConnectionStrategyLinkedin constant.
	ConnectionStrategyLinkedin = "linkedin"
	// ConnectionStrategyGitHub constant.
	ConnectionStrategyGitHub = "github"
	// ConnectionStrategyWindowsLive constant.
	ConnectionStrategyWindowsLive = "windowslive"
	// ConnectionStrategySalesforce constant.
	ConnectionStrategySalesforce = "salesforce"
	// ConnectionStrategySalesforceCommunity constant.
	ConnectionStrategySalesforceCommunity = "salesforce-community"
	// ConnectionStrategySalesforceSandbox constant.
	ConnectionStrategySalesforceSandbox = "salesforce-sandbox"
	// ConnectionStrategyEmail constant.
	ConnectionStrategyEmail = "email"
	// ConnectionStrategySMS constant.
	ConnectionStrategySMS = "sms"
	// ConnectionStrategyOIDC constant.
	ConnectionStrategyOIDC = "oidc"
	// ConnectionStrategyOAuth2 constant.
	ConnectionStrategyOAuth2 = "oauth2"
	// ConnectionStrategyAD constant.
	ConnectionStrategyAD = "ad"
	// ConnectionStrategyADFS constant.
	ConnectionStrategyADFS = "adfs"
	// ConnectionStrategyAzureAD constant.
	ConnectionStrategyAzureAD = "waad"
	// ConnectionStrategySAML constant.
	ConnectionStrategySAML = "samlp"
	// ConnectionStrategyGoogleApps constant.
	ConnectionStrategyGoogleApps = "google-apps"
	// ConnectionStrategyDropbox constant.
	ConnectionStrategyDropbox = "dropbox"
	// ConnectionStrategyBitBucket constant.
	ConnectionStrategyBitBucket = "bitbucket"
	// ConnectionStrategyPaypal constant.
	ConnectionStrategyPaypal = "paypal"
	// ConnectionStrategyTwitter constant.
	ConnectionStrategyTwitter = "twitter"
	// ConnectionStrategyAmazon constant.
	ConnectionStrategyAmazon = "amazon"
	// ConnectionStrategyYahoo constant.
	ConnectionStrategyYahoo = "yahoo"
	// ConnectionStrategyBox constant.
	ConnectionStrategyBox = "box"
	// ConnectionStrategyWordpress constant.
	ConnectionStrategyWordpress = "wordpress"
	// ConnectionStrategyDiscord constant.
	ConnectionStrategyDiscord = "discord"
	// ConnectionStrategyImgur constant.
	ConnectionStrategyImgur = "imgur"
	// ConnectionStrategySpotify constant.
	ConnectionStrategySpotify = "spotify"
	// ConnectionStrategyShopify constant.
	ConnectionStrategyShopify = "shopify"
	// ConnectionStrategyFigma constant.
	ConnectionStrategyFigma = "figma"
	// ConnectionStrategySlack constant.
	ConnectionStrategySlack = "slack-oauth-2"
	// ConnectionStrategyDigitalOcean constant.
	ConnectionStrategyDigitalOcean = "digitalocean"
	// ConnectionStrategyTwitch constant.
	ConnectionStrategyTwitch = "twitch"
	// ConnectionStrategyVimeo constant.
	ConnectionStrategyVimeo = "vimeo"
	// ConnectionStrategyCustom constant.
	ConnectionStrategyCustom = "custom"
)
View Source
const (
	// LogStreamTypeAmazonEventBridge constant.
	LogStreamTypeAmazonEventBridge = "eventbridge"
	// LogStreamTypeAzureEventGrid constant.
	LogStreamTypeAzureEventGrid = "eventgrid"
	// LogStreamTypeHTTP constant.
	LogStreamTypeHTTP = "http"
	// LogStreamTypeDatadog constant.
	LogStreamTypeDatadog = "datadog"
	// LogStreamTypeSplunk constant.
	LogStreamTypeSplunk = "splunk"
	// LogStreamTypeSumo constant.
	LogStreamTypeSumo = "sumo"
)

Variables

This section is empty.

Functions

func Stringify

func Stringify(v interface{}) string

Stringify returns a string representation of the value passed as an argument.

Types

type Action

type Action struct {
	// ID of the action
	ID *string `json:"id,omitempty"`
	// The name of an action
	Name *string `json:"name"`
	// List of triggers that this action supports. At this time, an action can
	// only target a single trigger at a time.
	SupportedTriggers []*ActionTrigger `json:"supported_triggers"`
	// The source code of the action.
	Code *string `json:"code,omitempty"`
	// List of third party npm modules, and their versions, that this action
	// depends on.
	Dependencies []*ActionDependency `json:"dependencies,omitempty"`
	// The Node runtime. For example `node16`, defaults to `node12`
	Runtime *string `json:"runtime,omitempty"`
	// List of secrets that are included in an action or a version of an action.
	Secrets []*ActionSecret `json:"secrets,omitempty"`
	// Version of the action that is currently deployed.
	DeployedVersion *ActionVersion `json:"deployed_version,omitempty"`
	// The build status of this action.
	Status *string `json:"status,omitempty"`
	// True if all of an Action's contents have been deployed.
	AllChangesDeployed bool `json:"all_changes_deployed,omitempty"`
	// The time when this action was built successfully.
	BuiltAt *time.Time `json:"built_at,omitempty"`
	// The time when this action was created.
	CreatedAt *time.Time `json:"created_at,omitempty"`
	// The time when this action was updated.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

Action represents an Auth0 Action.

See: https://auth0.com/docs/customize/actions/actions-overview

func (*Action) GetBuiltAt

func (a *Action) GetBuiltAt() time.Time

GetBuiltAt returns the BuiltAt field if it's non-nil, zero value otherwise.

func (*Action) GetCode

func (a *Action) GetCode() string

GetCode returns the Code field if it's non-nil, zero value otherwise.

func (*Action) GetCreatedAt

func (a *Action) GetCreatedAt() time.Time

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*Action) GetDeployedVersion

func (a *Action) GetDeployedVersion() *ActionVersion

GetDeployedVersion returns the DeployedVersion field.

func (*Action) GetID

func (a *Action) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Action) GetName

func (a *Action) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Action) GetRuntime

func (a *Action) GetRuntime() string

GetRuntime returns the Runtime field if it's non-nil, zero value otherwise.

func (*Action) GetStatus

func (a *Action) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*Action) GetUpdatedAt

func (a *Action) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.

func (*Action) String

func (a *Action) String() string

String returns a string representation of Action.

type ActionBinding

type ActionBinding struct {
	ID          *string `json:"id,omitempty"`
	TriggerID   *string `json:"trigger_id,omitempty"`
	DisplayName *string `json:"display_name,omitempty"`

	Ref     *ActionBindingReference `json:"ref,omitempty"`
	Action  *Action                 `json:"action,omitempty"`
	Secrets []*ActionSecret         `json:"secrets,omitempty"`

	CreatedAt *time.Time `json:"created_at,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

ActionBinding is used to attach an Action to an ActionTrigger.

func (*ActionBinding) GetAction

func (a *ActionBinding) GetAction() *Action

GetAction returns the Action field.

func (*ActionBinding) GetCreatedAt

func (a *ActionBinding) GetCreatedAt() time.Time

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*ActionBinding) GetDisplayName

func (a *ActionBinding) GetDisplayName() string

GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.

func (*ActionBinding) GetID

func (a *ActionBinding) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ActionBinding) GetRef

GetRef returns the Ref field.

func (*ActionBinding) GetTriggerID

func (a *ActionBinding) GetTriggerID() string

GetTriggerID returns the TriggerID field if it's non-nil, zero value otherwise.

func (*ActionBinding) GetUpdatedAt

func (a *ActionBinding) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.

func (*ActionBinding) String

func (a *ActionBinding) String() string

String returns a string representation of ActionBinding.

type ActionBindingList

type ActionBindingList struct {
	List
	Bindings []*ActionBinding `json:"bindings"`
}

ActionBindingList is a list of ActionBindings.

func (*ActionBindingList) String

func (a *ActionBindingList) String() string

String returns a string representation of ActionBindingList.

type ActionBindingReference

type ActionBindingReference struct {
	Type  *string `json:"type"`
	Value *string `json:"value"`
}

ActionBindingReference holds the reference of an Action attached to an ActionTrigger.

func (*ActionBindingReference) GetType

func (a *ActionBindingReference) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*ActionBindingReference) GetValue

func (a *ActionBindingReference) GetValue() string

GetValue returns the Value field if it's non-nil, zero value otherwise.

func (*ActionBindingReference) String

func (a *ActionBindingReference) String() string

String returns a string representation of ActionBindingReference.

type ActionDependency

type ActionDependency struct {
	Name        *string `json:"name"`
	Version     *string `json:"version,omitempty"`
	RegistryURL *string `json:"registry_url,omitempty"`
}

ActionDependency is used to allow the use of packages from the npm registry.

See: https://auth0.com/docs/customize/actions/flows-and-triggers

func (*ActionDependency) GetName

func (a *ActionDependency) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*ActionDependency) GetRegistryURL

func (a *ActionDependency) GetRegistryURL() string

GetRegistryURL returns the RegistryURL field if it's non-nil, zero value otherwise.

func (*ActionDependency) GetVersion

func (a *ActionDependency) GetVersion() string

GetVersion returns the Version field if it's non-nil, zero value otherwise.

func (*ActionDependency) String

func (a *ActionDependency) String() string

String returns a string representation of ActionDependency.

type ActionExecution

type ActionExecution struct {
	ID        *string                  `json:"id"`
	TriggerID *string                  `json:"trigger_id"`
	Status    *string                  `json:"status"`
	Results   []*ActionExecutionResult `json:"results"`

	CreatedAt *time.Time `json:"created_at"`
	UpdatedAt *time.Time `json:"updated_at"`
}

ActionExecution is used to retrieve information about a specific execution of an ActionTrigger.

func (*ActionExecution) GetCreatedAt

func (a *ActionExecution) GetCreatedAt() time.Time

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*ActionExecution) GetID

func (a *ActionExecution) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ActionExecution) GetStatus

func (a *ActionExecution) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*ActionExecution) GetTriggerID

func (a *ActionExecution) GetTriggerID() string

GetTriggerID returns the TriggerID field if it's non-nil, zero value otherwise.

func (*ActionExecution) GetUpdatedAt

func (a *ActionExecution) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.

func (*ActionExecution) String

func (a *ActionExecution) String() string

String returns a string representation of ActionExecution.

type ActionExecutionResult

type ActionExecutionResult struct {
	ActionName *string                `json:"action_name,omitempty"`
	Error      map[string]interface{} `json:"error,omitempty"`

	StartedAt *time.Time `json:"started_at,omitempty"`
	EndedAt   *time.Time `json:"ended_at,omitempty"`
}

ActionExecutionResult holds the results of an ActionExecution.

func (*ActionExecutionResult) GetActionName

func (a *ActionExecutionResult) GetActionName() string

GetActionName returns the ActionName field if it's non-nil, zero value otherwise.

func (*ActionExecutionResult) GetEndedAt

func (a *ActionExecutionResult) GetEndedAt() time.Time

GetEndedAt returns the EndedAt field if it's non-nil, zero value otherwise.

func (*ActionExecutionResult) GetStartedAt

func (a *ActionExecutionResult) GetStartedAt() time.Time

GetStartedAt returns the StartedAt field if it's non-nil, zero value otherwise.

func (*ActionExecutionResult) String

func (a *ActionExecutionResult) String() string

String returns a string representation of ActionExecutionResult.

type ActionList

type ActionList struct {
	List
	Actions []*Action `json:"actions"`
}

ActionList is a list of Actions.

func (*ActionList) String

func (a *ActionList) String() string

String returns a string representation of ActionList.

type ActionManager

type ActionManager struct {
	*Management
}

ActionManager manages Auth0 Action resources.

func (*ActionManager) Bindings

func (m *ActionManager) Bindings(triggerID string, opts ...RequestOption) (bl *ActionBindingList, err error)

Bindings lists the bindings of a trigger.

See: https://auth0.com/docs/api/management/v2/#!/Actions/get_bindings

func (*ActionManager) Create

func (m *ActionManager) Create(a *Action, opts ...RequestOption) error

Create a new action.

See: https://auth0.com/docs/api/management/v2#!/Actions/post_action

func (*ActionManager) Delete

func (m *ActionManager) Delete(id string, opts ...RequestOption) error

Delete an action

See: https://auth0.com/docs/api/management/v2#!/Actions/delete_action

func (*ActionManager) Deploy

func (m *ActionManager) Deploy(id string, opts ...RequestOption) (v *ActionVersion, err error)

Deploy an action

See: https://auth0.com/docs/api/management/v2/#!/Actions/post_deploy_action

func (*ActionManager) DeployVersion

func (m *ActionManager) DeployVersion(id string, versionID string, opts ...RequestOption) (v *ActionVersion, err error)

DeployVersion of an action

See: https://auth0.com/docs/api/management/v2/#!/Actions/post_deploy_draft_version

func (*ActionManager) Execution

func (m *ActionManager) Execution(executionID string, opts ...RequestOption) (v *ActionExecution, err error)

Execution retrieves the details of an action execution.

See: https://auth0.com/docs/api/management/v2/#!/Actions/get_execution

func (*ActionManager) List

func (m *ActionManager) List(opts ...RequestOption) (l *ActionList, err error)

List all actions.

See: https://auth0.com/docs/api/management/v2#!/Actions/get_actions

func (*ActionManager) Read

func (m *ActionManager) Read(id string, opts ...RequestOption) (a *Action, err error)

Retrieve action details.

See: https://auth0.com/docs/api/management/v2#!/Actions/get_action

func (*ActionManager) Test

func (m *ActionManager) Test(id string, payload *ActionTestPayload, opts ...RequestOption) (err error)

Test an action.

See: https://auth0.com/docs/api/management/v2/#!/Actions/post_test_action

func (*ActionManager) Triggers

func (m *ActionManager) Triggers(opts ...RequestOption) (l *ActionTriggerList, err error)

Triggers lists the available triggers.

https://auth0.com/docs/api/management/v2/#!/Actions/get_triggers

func (*ActionManager) Update

func (m *ActionManager) Update(id string, a *Action, opts ...RequestOption) error

Update an existing action.

See: https://auth0.com/docs/api/management/v2#!/Actions/patch_action

func (*ActionManager) UpdateBindings

func (m *ActionManager) UpdateBindings(triggerID string, b []*ActionBinding, opts ...RequestOption) error

UpdateBindings of a trigger.

See: https://auth0.com/docs/api/management/v2/#!/Actions/patch_bindings

func (*ActionManager) Version

func (m *ActionManager) Version(id string, versionID string, opts ...RequestOption) (v *ActionVersion, err error)

Version retrieves the version of an action.

See: https://auth0.com/docs/api/management/v2/#!/Actions/get_action_version

func (*ActionManager) Versions

func (m *ActionManager) Versions(id string, opts ...RequestOption) (c *ActionVersionList, err error)

Versions lists all versions of an action.

See: https://auth0.com/docs/api/management/v2/#!/Actions/get_action_versions

type ActionSecret

type ActionSecret struct {
	Name      *string    `json:"name"`
	Value     *string    `json:"value,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

ActionSecret is used to hold Secret values within an Action.

See: https://auth0.com/docs/customize/actions/write-your-first-action#add-a-secret

func (*ActionSecret) GetName

func (a *ActionSecret) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*ActionSecret) GetUpdatedAt

func (a *ActionSecret) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.

func (*ActionSecret) GetValue

func (a *ActionSecret) GetValue() string

GetValue returns the Value field if it's non-nil, zero value otherwise.

func (*ActionSecret) String

func (a *ActionSecret) String() string

String returns a string representation of ActionSecret.

type ActionTestPayload

type ActionTestPayload map[string]interface{}

ActionTestPayload is used for testing Actions prior to being deployed.

See: https://auth0.com/docs/customize/actions/test-actions

type ActionTrigger

type ActionTrigger struct {
	ID      *string `json:"id"`
	Version *string `json:"version"`
	Status  *string `json:"status,omitempty"`
}

ActionTrigger is part of a Flow.

See: https://auth0.com/docs/customize/actions/flows-and-triggers

func (*ActionTrigger) GetID

func (a *ActionTrigger) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ActionTrigger) GetStatus

func (a *ActionTrigger) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*ActionTrigger) GetVersion

func (a *ActionTrigger) GetVersion() string

GetVersion returns the Version field if it's non-nil, zero value otherwise.

func (*ActionTrigger) String

func (a *ActionTrigger) String() string

String returns a string representation of ActionTrigger.

type ActionTriggerList

type ActionTriggerList struct {
	Triggers []*ActionTrigger `json:"triggers"`
}

ActionTriggerList is a list of ActionTriggers.

func (*ActionTriggerList) String

func (a *ActionTriggerList) String() string

String returns a string representation of ActionTriggerList.

type ActionVersion

type ActionVersion struct {
	ID           *string             `json:"id,omitempty"`
	Code         *string             `json:"code"`
	Dependencies []*ActionDependency `json:"dependencies,omitempty"`
	Deployed     bool                `json:"deployed"`
	Status       *string             `json:"status,omitempty"`
	Number       int                 `json:"number,omitempty"`

	Errors []*ActionVersionError `json:"errors,omitempty"`
	Action *Action               `json:"action,omitempty"`

	BuiltAt   *time.Time `json:"built_at,omitempty"`
	CreatedAt *time.Time `json:"created_at,omitempty"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

ActionVersion is used to manage Actions version history.

See: https://auth0.com/docs/customize/actions/manage-versions

func (*ActionVersion) GetAction

func (a *ActionVersion) GetAction() *Action

GetAction returns the Action field.

func (*ActionVersion) GetBuiltAt

func (a *ActionVersion) GetBuiltAt() time.Time

GetBuiltAt returns the BuiltAt field if it's non-nil, zero value otherwise.

func (*ActionVersion) GetCode

func (a *ActionVersion) GetCode() string

GetCode returns the Code field if it's non-nil, zero value otherwise.

func (*ActionVersion) GetCreatedAt

func (a *ActionVersion) GetCreatedAt() time.Time

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*ActionVersion) GetID

func (a *ActionVersion) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ActionVersion) GetStatus

func (a *ActionVersion) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*ActionVersion) GetUpdatedAt

func (a *ActionVersion) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.

func (*ActionVersion) String

func (a *ActionVersion) String() string

String returns a string representation of ActionVersion.

type ActionVersionError

type ActionVersionError struct {
	ID      *string `json:"id"`
	Message *string `json:"msg"`
	URL     *string `json:"url"`
}

ActionVersionError is used to keep track of the errors of a specific ActionVersion.

func (*ActionVersionError) GetID

func (a *ActionVersionError) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ActionVersionError) GetMessage

func (a *ActionVersionError) GetMessage() string

GetMessage returns the Message field if it's non-nil, zero value otherwise.

func (*ActionVersionError) GetURL

func (a *ActionVersionError) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*ActionVersionError) String

func (a *ActionVersionError) String() string

String returns a string representation of ActionVersionError.

type ActionVersionList

type ActionVersionList struct {
	List
	Versions []*ActionVersion `json:"versions"`
}

ActionVersionList is a list of ActionVersions.

func (*ActionVersionList) String

func (a *ActionVersionList) String() string

String returns a string representation of ActionVersionList.

type AnomalyManager

type AnomalyManager struct {
	*Management
}

AnomalyManager manages Auth0 Anomaly resources.

func (*AnomalyManager) CheckIP

func (m *AnomalyManager) CheckIP(ip string, opts ...RequestOption) (isBlocked bool, err error)

CheckIP checks if a given IP address is blocked via the multiple user accounts trigger due to multiple failed logins.

See: https://auth0.com/docs/api/management/v2#!/Anomaly/get_ips_by_id

func (*AnomalyManager) UnblockIP

func (m *AnomalyManager) UnblockIP(ip string, opts ...RequestOption) (err error)

UnblockIP unblocks an IP address currently blocked by the multiple user accounts trigger due to multiple failed logins.

See: https://auth0.com/docs/api/management/v2#!/Anomaly/delete_ips_by_id

type AttackProtectionManager

type AttackProtectionManager struct {
	*Management
}

AttackProtectionManager manages Auth0 Attack Protection settings.

See: https://auth0.com/docs/secure/attack-protection

func (*AttackProtectionManager) GetBreachedPasswordDetection

func (m *AttackProtectionManager) GetBreachedPasswordDetection(
	opts ...RequestOption,
) (*BreachedPasswordDetection, error)

GetBreachedPasswordDetection retrieves breached password detection settings.

Required scope: `read:attack_protection`

See: https://auth0.com/docs/api/management/v2#!/Attack_Protection/get_breached_password_detection

func (*AttackProtectionManager) GetBruteForceProtection

func (m *AttackProtectionManager) GetBruteForceProtection(
	opts ...RequestOption,
) (*BruteForceProtection, error)

GetBruteForceProtection retrieves the brute force configuration.

Required scope: `read:attack_protection`

See: https://auth0.com/docs/api/management/v2#!/Attack_Protection/get_brute_force_protection

func (*AttackProtectionManager) GetSuspiciousIPThrottling

func (m *AttackProtectionManager) GetSuspiciousIPThrottling(
	opts ...RequestOption,
) (*SuspiciousIPThrottling, error)

GetSuspiciousIPThrottling retrieves the suspicious IP throttling configuration.

Required scope: `read:attack_protection`

See: https://auth0.com/docs/api/management/v2#!/Attack_Protection/get_suspicious_ip_throttling

func (*AttackProtectionManager) UpdateBreachedPasswordDetection

func (m *AttackProtectionManager) UpdateBreachedPasswordDetection(
	breachedPasswordDetection *BreachedPasswordDetection,
	opts ...RequestOption,
) error

UpdateBreachedPasswordDetection updates the breached password detection settings.

Required scope: `read:attack_protection`

See: https://auth0.com/docs/api/management/v2#!/Attack_Protection/patch_breached_password_detection

func (*AttackProtectionManager) UpdateBruteForceProtection

func (m *AttackProtectionManager) UpdateBruteForceProtection(
	bruteForceProtection *BruteForceProtection,
	opts ...RequestOption,
) error

UpdateBruteForceProtection updates the brute force configuration.

Required scope: `read:attack_protection`

See: https://auth0.com/docs/api/management/v2#!/Attack_Protection/patch_brute_force_protection

func (*AttackProtectionManager) UpdateSuspiciousIPThrottling

func (m *AttackProtectionManager) UpdateSuspiciousIPThrottling(
	suspiciousIPThrottling *SuspiciousIPThrottling,
	opts ...RequestOption,
) error

UpdateSuspiciousIPThrottling updates the suspicious IP throttling configuration.

Required scope: `read:attack_protection`

See: https://auth0.com/docs/api/management/v2#!/Attack_Protection/patch_suspicious_ip_throttling

type BlacklistManager

type BlacklistManager struct {
	*Management
}

BlacklistManager manages Auth0 BlacklistToken resources.

func (*BlacklistManager) Create

func (m *BlacklistManager) Create(t *BlacklistToken, opts ...RequestOption) error

Create a blacklist for a token.

See: https://auth0.com/docs/api/management/v2#!/Blacklists/post_tokens

func (*BlacklistManager) List

func (m *BlacklistManager) List(opts ...RequestOption) (bl []*BlacklistToken, err error)

List all tokens that are blacklisted.

Note: The JWT specification states that the `jti` field can be used to prevent replay attacks. Though Auth0 tokens do not include a `jti`, you can nevertheless blacklist a `jti` to prevent a token being used more than a predetermined number of times. This behavior is similar to implementing a nonce (where the token's signature can be thought of as the nonce). If a token gets stolen, it (or the tokens issued after it) should be blacklisted and let expire.

See: https://auth0.com/docs/api/management/v2#!/Blacklists/get_tokens

type BlacklistToken

type BlacklistToken struct {
	// The "aud" (audience) claim identifies the
	// recipients that the JWT is intended for.
	//
	// See: https://tools.ietf.org/html/rfc7519#section-4.1.3
	Audience string `json:"aud,omitempty"`

	// The "jti" (JWT ID) claim provides a unique
	// (within "aud") identifier for the JWT.
	//
	// See: https://tools.ietf.org/html/rfc7519#section-4.1.7
	JTI string `json:"jti,omitempty"`
}

BlacklistToken is a token that has been blacklisted.

func (*BlacklistToken) String

func (b *BlacklistToken) String() string

String returns a string representation of BlacklistToken.

type Branding

type Branding struct {
	// Change login page colors.
	Colors *BrandingColors `json:"colors,omitempty"`

	// URL for the favicon. Must use HTTPS.
	FaviconURL *string `json:"favicon_url,omitempty"`

	// URL for the logo. Must use HTTPS.
	LogoURL *string `json:"logo_url,omitempty"`

	Font *BrandingFont `json:"font,omitempty"`
}

Branding is used to customize the look and feel of Auth0 to align with an organization's brand requirements and user expectations.

See: https://auth0.com/docs/customize

func (*Branding) GetColors

func (b *Branding) GetColors() *BrandingColors

GetColors returns the Colors field.

func (*Branding) GetFaviconURL

func (b *Branding) GetFaviconURL() string

GetFaviconURL returns the FaviconURL field if it's non-nil, zero value otherwise.

func (*Branding) GetFont

func (b *Branding) GetFont() *BrandingFont

GetFont returns the Font field.

func (*Branding) GetLogoURL

func (b *Branding) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*Branding) String

func (b *Branding) String() string

String returns a string representation of Branding.

type BrandingColors

type BrandingColors struct {
	// Accent color.
	Primary *string `json:"primary,omitempty"`

	// Page background color.
	//
	// Only one of PageBackground and PageBackgroundGradient should be set. If
	// both fields are set, PageBackground takes priority.
	PageBackground *string `json:"-"`

	// Page background gradient.
	//
	// Only one of PageBackground and PageBackgroundGradient should be set. If
	// both fields are set, PageBackground takes priority.
	PageBackgroundGradient *BrandingPageBackgroundGradient `json:"-"`
}

BrandingColors are used to customize the Universal Login Page.

func (*BrandingColors) GetPageBackground

func (b *BrandingColors) GetPageBackground() string

GetPageBackground returns the PageBackground field if it's non-nil, zero value otherwise.

func (*BrandingColors) GetPageBackgroundGradient

func (b *BrandingColors) GetPageBackgroundGradient() *BrandingPageBackgroundGradient

GetPageBackgroundGradient returns the PageBackgroundGradient field.

func (*BrandingColors) GetPrimary

func (b *BrandingColors) GetPrimary() string

GetPrimary returns the Primary field if it's non-nil, zero value otherwise.

func (*BrandingColors) MarshalJSON

func (bc *BrandingColors) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

It is required to handle the json field page_background, which can either be a hex color string, or an object describing a gradient.

func (*BrandingColors) String

func (b *BrandingColors) String() string

String returns a string representation of BrandingColors.

func (*BrandingColors) UnmarshalJSON

func (bc *BrandingColors) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

It is required to handle the json field page_background, which can either be a hex color string, or an object describing a gradient.

type BrandingFont

type BrandingFont struct {
	// URL for the custom font. Must use HTTPS.
	URL *string `json:"url,omitempty"`
}

BrandingFont is used to customize the font on the Universal Login Page.

func (*BrandingFont) GetURL

func (b *BrandingFont) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*BrandingFont) String

func (b *BrandingFont) String() string

String returns a string representation of BrandingFont.

type BrandingManager

type BrandingManager struct {
	*Management
}

BrandingManager manages Auth0 Branding resources.

func (*BrandingManager) DeleteUniversalLogin

func (m *BrandingManager) DeleteUniversalLogin(opts ...RequestOption) (err error)

DeleteUniversalLogin deletes the template for the New Universal Login Experience.

See: https://auth0.com/docs/api/management/v2#!/Branding/delete_universal_login

func (*BrandingManager) Read

func (m *BrandingManager) Read(opts ...RequestOption) (b *Branding, err error)

Read retrieves various settings related to branding.

See: https://auth0.com/docs/api/management/v2#!/Branding/get_branding

func (*BrandingManager) SetUniversalLogin

func (m *BrandingManager) SetUniversalLogin(ul *BrandingUniversalLogin, opts ...RequestOption) (err error)

SetUniversalLogin sets the template for the New Universal Login Experience.

See: https://auth0.com/docs/api/management/v2#!/Branding/put_universal_login

func (*BrandingManager) UniversalLogin

func (m *BrandingManager) UniversalLogin(opts ...RequestOption) (ul *BrandingUniversalLogin, err error)

UniversalLogin retrieves the template for the New Universal Login Experience.

See: https://auth0.com/docs/api/management/v2#!/Branding/get_universal_login

func (*BrandingManager) Update

func (m *BrandingManager) Update(t *Branding, opts ...RequestOption) (err error)

Update various fields related to branding.

See: https://auth0.com/docs/api/management/v2#!/Branding/patch_branding

type BrandingPageBackgroundGradient

type BrandingPageBackgroundGradient struct {
	Type        *string `json:"type,omitempty"`
	Start       *string `json:"start,omitempty"`
	End         *string `json:"end,omitempty"`
	AngleDegree *int    `json:"angle_deg,omitempty"`
}

BrandingPageBackgroundGradient is used to customize the background color of the Universal Login Page.

func (*BrandingPageBackgroundGradient) GetAngleDegree

func (b *BrandingPageBackgroundGradient) GetAngleDegree() int

GetAngleDegree returns the AngleDegree field if it's non-nil, zero value otherwise.

func (*BrandingPageBackgroundGradient) GetEnd

GetEnd returns the End field if it's non-nil, zero value otherwise.

func (*BrandingPageBackgroundGradient) GetStart

func (b *BrandingPageBackgroundGradient) GetStart() string

GetStart returns the Start field if it's non-nil, zero value otherwise.

func (*BrandingPageBackgroundGradient) GetType

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*BrandingPageBackgroundGradient) String

String returns a string representation of BrandingPageBackgroundGradient.

type BrandingUniversalLogin

type BrandingUniversalLogin struct {
	Body *string `json:"body,omitempty"`
}

BrandingUniversalLogin is used to customize the body of the Universal Login Page.

func (*BrandingUniversalLogin) GetBody

func (b *BrandingUniversalLogin) GetBody() string

GetBody returns the Body field if it's non-nil, zero value otherwise.

func (*BrandingUniversalLogin) String

func (b *BrandingUniversalLogin) String() string

String returns a string representation of BrandingUniversalLogin.

type BreachedPasswordDetection

type BreachedPasswordDetection struct {
	Enabled                    *bool     `json:"enabled,omitempty"`
	Shields                    *[]string `json:"shields,omitempty"`
	AdminNotificationFrequency *[]string `json:"admin_notification_frequency,omitempty"`
	Method                     *string   `json:"method,omitempty"`
}

BreachedPasswordDetection protects applications from bad actors logging in with stolen credentials.

See: https://auth0.com/docs/secure/attack-protection/breached-password-detection

func (*BreachedPasswordDetection) GetAdminNotificationFrequency

func (b *BreachedPasswordDetection) GetAdminNotificationFrequency() []string

GetAdminNotificationFrequency returns the AdminNotificationFrequency field if it's non-nil, zero value otherwise.

func (*BreachedPasswordDetection) GetEnabled

func (b *BreachedPasswordDetection) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*BreachedPasswordDetection) GetMethod

func (b *BreachedPasswordDetection) GetMethod() string

GetMethod returns the Method field if it's non-nil, zero value otherwise.

func (*BreachedPasswordDetection) GetShields

func (b *BreachedPasswordDetection) GetShields() []string

GetShields returns the Shields field if it's non-nil, zero value otherwise.

func (*BreachedPasswordDetection) String

func (b *BreachedPasswordDetection) String() string

String returns a string representation of BreachedPasswordDetection.

type BruteForceProtection

type BruteForceProtection struct {
	Enabled     *bool     `json:"enabled,omitempty"`
	Shields     *[]string `json:"shields,omitempty"`
	AllowList   *[]string `json:"allowlist,omitempty"`
	Mode        *string   `json:"mode,omitempty"`
	MaxAttempts *int      `json:"max_attempts,omitempty"`
}

BruteForceProtection safeguards against a single IP address attacking a single user account.

See: https://auth0.com/docs/secure/attack-protection/brute-force-protection

func (*BruteForceProtection) GetAllowList

func (b *BruteForceProtection) GetAllowList() []string

GetAllowList returns the AllowList field if it's non-nil, zero value otherwise.

func (*BruteForceProtection) GetEnabled

func (b *BruteForceProtection) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*BruteForceProtection) GetMaxAttempts

func (b *BruteForceProtection) GetMaxAttempts() int

GetMaxAttempts returns the MaxAttempts field if it's non-nil, zero value otherwise.

func (*BruteForceProtection) GetMode

func (b *BruteForceProtection) GetMode() string

GetMode returns the Mode field if it's non-nil, zero value otherwise.

func (*BruteForceProtection) GetShields

func (b *BruteForceProtection) GetShields() []string

GetShields returns the Shields field if it's non-nil, zero value otherwise.

func (*BruteForceProtection) String

func (b *BruteForceProtection) String() string

String returns a string representation of BruteForceProtection.

type Client

type Client struct {
	// The name of the client.
	Name *string `json:"name,omitempty"`

	// Free text description of the purpose of the Client.
	// Max character length is 140.
	Description *string `json:"description,omitempty"`

	// The ID of the client.
	ClientID *string `json:"client_id,omitempty"`

	// The client secret, it must not be public.
	ClientSecret *string `json:"client_secret,omitempty"`

	// The type of application this client represents.
	AppType *string `json:"app_type,omitempty"`

	// The URL of the client logo (recommended size: 150x150).
	LogoURI *string `json:"logo_uri,omitempty"`

	// Whether this client a first party client or not.
	IsFirstParty *bool `json:"is_first_party,omitempty"`

	// Set header `auth0-forwarded-for` as trusted to be used as source
	// of end user ip for brute-force-protection on token endpoint.
	IsTokenEndpointIPHeaderTrusted *bool `json:"is_token_endpoint_ip_header_trusted,omitempty"`

	// Whether this client will conform to strict OIDC specifications.
	OIDCConformant *bool `json:"oidc_conformant,omitempty"`

	// The URLs that Auth0 can use to as a callback for the client.
	Callbacks      []interface{} `json:"callbacks,omitempty"`
	AllowedOrigins []interface{} `json:"allowed_origins,omitempty"`

	// A set of URLs that represents valid web origins for use with web message response mode.
	WebOrigins        []interface{}           `json:"web_origins,omitempty"`
	ClientAliases     []interface{}           `json:"client_aliases,omitempty"`
	AllowedClients    []interface{}           `json:"allowed_clients,omitempty"`
	AllowedLogoutURLs []interface{}           `json:"allowed_logout_urls,omitempty"`
	JWTConfiguration  *ClientJWTConfiguration `json:"jwt_configuration,omitempty"`

	// Client signing keys.
	SigningKeys   []map[string]string `json:"signing_keys,omitempty"`
	EncryptionKey map[string]string   `json:"encryption_key,omitempty"`
	SSO           *bool               `json:"sso,omitempty"`

	// True to disable Single Sign On, false otherwise (default: false).
	SSODisabled *bool `json:"sso_disabled,omitempty"`

	// True if this client can be used to make cross-origin authentication
	// requests, false otherwise (default: false).
	CrossOriginAuth *bool `json:"cross_origin_auth,omitempty"`

	// List of acceptable Grant Types for this Client.
	GrantTypes []interface{} `json:"grant_types,omitempty"`

	// URL for the location in your site where the cross origin verification
	// takes place for the cross-origin auth flow when performing Auth in your
	// own domain instead of Auth0 hosted login page.
	CrossOriginLocation *string `json:"cross_origin_loc,omitempty"`

	// True if the custom login page is to be used, false otherwise. Defaults to true.
	CustomLoginPageOn      *bool                  `json:"custom_login_page_on,omitempty"`
	CustomLoginPage        *string                `json:"custom_login_page,omitempty"`
	CustomLoginPagePreview *string                `json:"custom_login_page_preview,omitempty"`
	FormTemplate           *string                `json:"form_template,omitempty"`
	Addons                 map[string]interface{} `json:"addons,omitempty"`

	// Defines the requested authentication method for the token endpoint.
	// Possible values are:
	// 	'none' (public client without a client secret),
	// 	'client_secret_post' (client uses HTTP POST parameters) or
	// 	'client_secret_basic' (client uses HTTP Basic)
	TokenEndpointAuthMethod *string                `json:"token_endpoint_auth_method,omitempty"`
	ClientMetadata          map[string]string      `json:"client_metadata,omitempty"`
	Mobile                  map[string]interface{} `json:"mobile,omitempty"`

	// Initiate login uri, must be https and cannot contain a fragment.
	InitiateLoginURI *string `json:"initiate_login_uri,omitempty"`

	NativeSocialLogin *ClientNativeSocialLogin `json:"native_social_login,omitempty"`
	RefreshToken      *ClientRefreshToken      `json:"refresh_token,omitempty"`

	OrganizationUsage           *string `json:"organization_usage,omitempty"`
	OrganizationRequireBehavior *string `json:"organization_require_behavior,omitempty"`
}

Client is an application or a sso integration.

See: https://auth0.com/docs/get-started/applications

func (*Client) GetAppType

func (c *Client) GetAppType() string

GetAppType returns the AppType field if it's non-nil, zero value otherwise.

func (*Client) GetClientID

func (c *Client) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*Client) GetClientMetadata added in v0.6.4

func (c *Client) GetClientMetadata() map[string]string

GetClientMetadata returns the ClientMetadata map if it's non-nil, an empty map otherwise.

func (*Client) GetClientSecret

func (c *Client) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*Client) GetCrossOriginAuth

func (c *Client) GetCrossOriginAuth() bool

GetCrossOriginAuth returns the CrossOriginAuth field if it's non-nil, zero value otherwise.

func (*Client) GetCrossOriginLocation

func (c *Client) GetCrossOriginLocation() string

GetCrossOriginLocation returns the CrossOriginLocation field if it's non-nil, zero value otherwise.

func (*Client) GetCustomLoginPage

func (c *Client) GetCustomLoginPage() string

GetCustomLoginPage returns the CustomLoginPage field if it's non-nil, zero value otherwise.

func (*Client) GetCustomLoginPageOn

func (c *Client) GetCustomLoginPageOn() bool

GetCustomLoginPageOn returns the CustomLoginPageOn field if it's non-nil, zero value otherwise.

func (*Client) GetCustomLoginPagePreview

func (c *Client) GetCustomLoginPagePreview() string

GetCustomLoginPagePreview returns the CustomLoginPagePreview field if it's non-nil, zero value otherwise.

func (*Client) GetDescription

func (c *Client) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*Client) GetEncryptionKey added in v0.6.4

func (c *Client) GetEncryptionKey() map[string]string

GetEncryptionKey returns the EncryptionKey map if it's non-nil, an empty map otherwise.

func (*Client) GetFormTemplate

func (c *Client) GetFormTemplate() string

GetFormTemplate returns the FormTemplate field if it's non-nil, zero value otherwise.

func (*Client) GetInitiateLoginURI

func (c *Client) GetInitiateLoginURI() string

GetInitiateLoginURI returns the InitiateLoginURI field if it's non-nil, zero value otherwise.

func (*Client) GetIsFirstParty

func (c *Client) GetIsFirstParty() bool

GetIsFirstParty returns the IsFirstParty field if it's non-nil, zero value otherwise.

func (*Client) GetIsTokenEndpointIPHeaderTrusted

func (c *Client) GetIsTokenEndpointIPHeaderTrusted() bool

GetIsTokenEndpointIPHeaderTrusted returns the IsTokenEndpointIPHeaderTrusted field if it's non-nil, zero value otherwise.

func (*Client) GetJWTConfiguration

func (c *Client) GetJWTConfiguration() *ClientJWTConfiguration

GetJWTConfiguration returns the JWTConfiguration field.

func (*Client) GetLogoURI

func (c *Client) GetLogoURI() string

GetLogoURI returns the LogoURI field if it's non-nil, zero value otherwise.

func (*Client) GetName

func (c *Client) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Client) GetNativeSocialLogin

func (c *Client) GetNativeSocialLogin() *ClientNativeSocialLogin

GetNativeSocialLogin returns the NativeSocialLogin field.

func (*Client) GetOIDCConformant

func (c *Client) GetOIDCConformant() bool

GetOIDCConformant returns the OIDCConformant field if it's non-nil, zero value otherwise.

func (*Client) GetOrganizationRequireBehavior

func (c *Client) GetOrganizationRequireBehavior() string

GetOrganizationRequireBehavior returns the OrganizationRequireBehavior field if it's non-nil, zero value otherwise.

func (*Client) GetOrganizationUsage

func (c *Client) GetOrganizationUsage() string

GetOrganizationUsage returns the OrganizationUsage field if it's non-nil, zero value otherwise.

func (*Client) GetRefreshToken

func (c *Client) GetRefreshToken() *ClientRefreshToken

GetRefreshToken returns the RefreshToken field.

func (*Client) GetSSO

func (c *Client) GetSSO() bool

GetSSO returns the SSO field if it's non-nil, zero value otherwise.

func (*Client) GetSSODisabled

func (c *Client) GetSSODisabled() bool

GetSSODisabled returns the SSODisabled field if it's non-nil, zero value otherwise.

func (*Client) GetTokenEndpointAuthMethod

func (c *Client) GetTokenEndpointAuthMethod() string

GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field if it's non-nil, zero value otherwise.

func (*Client) String

func (c *Client) String() string

String returns a string representation of Client.

type ClientGrant

type ClientGrant struct {
	// A generated string identifying the client grant.
	ID *string `json:"id,omitempty"`

	// The identifier of the client.
	ClientID *string `json:"client_id,omitempty"`

	// The audience.
	Audience *string `json:"audience,omitempty"`

	Scope []interface{} `json:"scope"`
}

ClientGrant is a method through which applications can gain Access Tokens.

See: https://auth0.com/docs/get-started/applications/application-grant-types

func (*ClientGrant) GetAudience

func (c *ClientGrant) GetAudience() string

GetAudience returns the Audience field if it's non-nil, zero value otherwise.

func (*ClientGrant) GetClientID

func (c *ClientGrant) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ClientGrant) GetID

func (c *ClientGrant) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ClientGrant) String

func (c *ClientGrant) String() string

String returns a string representation of ClientGrant.

type ClientGrantList

type ClientGrantList struct {
	List
	ClientGrants []*ClientGrant `json:"client_grants"`
}

ClientGrantList is a list of ClientGrants.

func (*ClientGrantList) String

func (c *ClientGrantList) String() string

String returns a string representation of ClientGrantList.

type ClientGrantManager

type ClientGrantManager struct {
	*Management
}

ClientGrantManager manages Auth0 ClientGrant resources.

func (*ClientGrantManager) Create

func (m *ClientGrantManager) Create(g *ClientGrant, opts ...RequestOption) (err error)

Create a client grant.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/post_client_grants

func (*ClientGrantManager) Delete

func (m *ClientGrantManager) Delete(id string, opts ...RequestOption) (err error)

Delete a client grant.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/delete_client_grants_by_id

func (*ClientGrantManager) List

func (m *ClientGrantManager) List(opts ...RequestOption) (gs *ClientGrantList, err error)

List all client grants.

This method forces the `include_totals=true` and defaults to `per_page=50` if not provided.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/get_client_grants

func (*ClientGrantManager) Read

func (m *ClientGrantManager) Read(id string, opts ...RequestOption) (*ClientGrant, error)

Read a client grant by its ID.

The Auth0 Management API does not offer a method to retrieve a client grant by id, we fake this by listing all client grants and matching by id on the client side. For this reason this method should be used with caution.

func (*ClientGrantManager) Update

func (m *ClientGrantManager) Update(id string, g *ClientGrant, opts ...RequestOption) (err error)

Update a client grant.

See: https://auth0.com/docs/api/management/v2#!/Client_Grants/patch_client_grants_by_id

type ClientJWTConfiguration

type ClientJWTConfiguration struct {
	// The amount of seconds the JWT will be valid (affects exp claim)
	LifetimeInSeconds *int `json:"-"`

	// True if the client secret is base64 encoded, false otherwise. Defaults to
	// true
	SecretEncoded *bool `json:"secret_encoded,omitempty"`

	Scopes map[string]interface{} `json:"scopes,omitempty"`

	// Algorithm used to sign JWTs. Can be "HS256" or "RS256"
	Algorithm *string `json:"alg,omitempty"`
}

ClientJWTConfiguration is used to configure JWT settings for our Client.

func (*ClientJWTConfiguration) GetAlgorithm

func (c *ClientJWTConfiguration) GetAlgorithm() string

GetAlgorithm returns the Algorithm field if it's non-nil, zero value otherwise.

func (*ClientJWTConfiguration) GetLifetimeInSeconds

func (c *ClientJWTConfiguration) GetLifetimeInSeconds() int

GetLifetimeInSeconds returns the LifetimeInSeconds field if it's non-nil, zero value otherwise.

func (*ClientJWTConfiguration) GetSecretEncoded

func (c *ClientJWTConfiguration) GetSecretEncoded() bool

GetSecretEncoded returns the SecretEncoded field if it's non-nil, zero value otherwise.

func (*ClientJWTConfiguration) MarshalJSON

func (jc *ClientJWTConfiguration) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*ClientJWTConfiguration) String

func (c *ClientJWTConfiguration) String() string

String returns a string representation of ClientJWTConfiguration.

func (*ClientJWTConfiguration) UnmarshalJSON

func (jc *ClientJWTConfiguration) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

It is required to handle the json field lifetime_in_seconds, which can either be an int, or a string in older tenants.

type ClientList

type ClientList struct {
	List
	Clients []*Client `json:"clients"`
}

ClientList is a list of Clients.

func (*ClientList) String

func (c *ClientList) String() string

String returns a string representation of ClientList.

type ClientManager

type ClientManager struct {
	*Management
}

ClientManager manages Auth0 Client resources.

func (*ClientManager) Create

func (m *ClientManager) Create(c *Client, opts ...RequestOption) (err error)

Create a new client application.

See: https://auth0.com/docs/api/management/v2#!/Clients/post_clients

Example
c := &management.Client{
	Name:        auth0.String("Example Client"),
	Description: auth0.String("This client was created from the Auth0 SDK examples"),
}

err := api.Client.Create(c)
if err != nil {
	// handle err
	return
}
defer api.Client.Delete(c.GetClientID())

_ = c.GetClientID()
_ = c.GetClientSecret() // Generated values are available after creation
Output:

func (*ClientManager) Delete

func (m *ClientManager) Delete(id string, opts ...RequestOption) error

Delete a client and all its related assets (like rules, connections, etc) given its ID.

See: https://auth0.com/docs/api/management/v2#!/Clients/delete_clients_by_id

func (*ClientManager) List

func (m *ClientManager) List(opts ...RequestOption) (c *ClientList, err error)

List all client applications.

See: https://auth0.com/docs/api/management/v2#!/Clients/get_clients

func (*ClientManager) Read

func (m *ClientManager) Read(id string, opts ...RequestOption) (c *Client, err error)

Read a client by its ID.

See: https://auth0.com/docs/api/management/v2#!/Clients/get_clients_by_id

func (*ClientManager) RotateSecret

func (m *ClientManager) RotateSecret(id string, opts ...RequestOption) (c *Client, err error)

RotateSecret rotates a client secret.

See: https://auth0.com/docs/api/management/v2#!/Clients/post_rotate_secret

func (*ClientManager) Update

func (m *ClientManager) Update(id string, c *Client, opts ...RequestOption) (err error)

Update a client.

See: https://auth0.com/docs/api/management/v2#!/Clients/patch_clients_by_id

type ClientNativeSocialLogin

type ClientNativeSocialLogin struct {
	// Native Social Login support for the Apple connection
	Apple map[string]interface{} `json:"apple,omitempty"`

	// Native Social Login support for the Facebook connection
	Facebook map[string]interface{} `json:"facebook,omitempty"`
}

ClientNativeSocialLogin is used to configure Native Social Login for our Client.

func (*ClientNativeSocialLogin) String

func (c *ClientNativeSocialLogin) String() string

String returns a string representation of ClientNativeSocialLogin.

type ClientRefreshToken

type ClientRefreshToken struct {
	// Refresh token rotation type. Can be "rotating" or "non-rotating".
	RotationType *string `json:"rotation_type,omitempty"`

	// Refresh token expiration type. Can be "expiring" or "non-expiring".
	ExpirationType *string `json:"expiration_type,omitempty"`

	// Period in seconds where the previous refresh token can be exchanged
	// without triggering breach detection.
	Leeway *int `json:"leeway,omitempty"`

	// Period in seconds for which refresh tokens will remain valid
	TokenLifetime *int `json:"token_lifetime,omitempty"`

	// Whether the refresh tokens should remain valid indefinitely.
	// If false, "TokenLifetime" should be set.
	InfiniteTokenLifetime *bool `json:"infinite_token_lifetime,omitempty"`

	// Whether the inactive refresh tokens should remain valid indefinitely.
	InfiniteIdleTokenLifetime *bool `json:"infinite_idle_token_lifetime,omitempty"`

	// Period in seconds after which inactive refresh tokens will expire.
	IdleTokenLifetime *int `json:"idle_token_lifetime,omitempty"`
}

ClientRefreshToken is used to configure the Refresh Token settings for our Client.

func (*ClientRefreshToken) GetExpirationType

func (c *ClientRefreshToken) GetExpirationType() string

GetExpirationType returns the ExpirationType field if it's non-nil, zero value otherwise.

func (*ClientRefreshToken) GetIdleTokenLifetime

func (c *ClientRefreshToken) GetIdleTokenLifetime() int

GetIdleTokenLifetime returns the IdleTokenLifetime field if it's non-nil, zero value otherwise.

func (*ClientRefreshToken) GetInfiniteIdleTokenLifetime

func (c *ClientRefreshToken) GetInfiniteIdleTokenLifetime() bool

GetInfiniteIdleTokenLifetime returns the InfiniteIdleTokenLifetime field if it's non-nil, zero value otherwise.

func (*ClientRefreshToken) GetInfiniteTokenLifetime

func (c *ClientRefreshToken) GetInfiniteTokenLifetime() bool

GetInfiniteTokenLifetime returns the InfiniteTokenLifetime field if it's non-nil, zero value otherwise.

func (*ClientRefreshToken) GetLeeway

func (c *ClientRefreshToken) GetLeeway() int

GetLeeway returns the Leeway field if it's non-nil, zero value otherwise.

func (*ClientRefreshToken) GetRotationType

func (c *ClientRefreshToken) GetRotationType() string

GetRotationType returns the RotationType field if it's non-nil, zero value otherwise.

func (*ClientRefreshToken) GetTokenLifetime

func (c *ClientRefreshToken) GetTokenLifetime() int

GetTokenLifetime returns the TokenLifetime field if it's non-nil, zero value otherwise.

func (*ClientRefreshToken) String

func (c *ClientRefreshToken) String() string

String returns a string representation of ClientRefreshToken.

type Connection

type Connection struct {
	// A generated string identifying the connection.
	ID *string `json:"id,omitempty"`

	// The name of the connection. Must start and end with an alphanumeric
	// character and can only contain alphanumeric characters and '-'. Max
	// length 128.
	Name        *string `json:"name,omitempty"`
	DisplayName *string `json:"display_name,omitempty"`

	// The identity provider identifier for the connection. Can be any of the
	// following:
	//
	// "ad", "adfs", "amazon", "dropbox", "bitbucket", "aol", "auth0-adldap",
	// "auth0-oidc", "auth0", "baidu", "bitly", "box", "custom", "daccount",
	// "dwolla", "email", "evernote-sandbox", "evernote", "exact", "facebook",
	// "fitbit", "flickr", "github", "google-apps", "google-oauth2", "guardian",
	//  "instagram", "ip", "linkedin", "miicard", "oauth1", "oauth2",
	// "office365", "paypal", "paypal-sandbox", "pingfederate",
	// "planningcenter", "renren", "salesforce-community", "salesforce-sandbox",
	//  "salesforce", "samlp", "sharepoint", "shopify", "sms", "soundcloud",
	// "thecity-sandbox", "thecity", "thirtysevensignals", "twitter", "untappd",
	//  "vkontakte", "waad", "weibo", "windowslive", "wordpress", "yahoo",
	// "yammer" or "yandex".
	Strategy *string `json:"strategy,omitempty"`

	// True if the connection is domain level
	IsDomainConnection *bool `json:"is_domain_connection,omitempty"`

	// Options for validation.
	Options interface{} `json:"-"`

	// The identifiers of the clients for which the connection is to be
	// enabled. If the array is empty or the property is not specified, no
	// clients are enabled.
	EnabledClients []interface{} `json:"enabled_clients,omitempty"`

	// Defines the realms for which the connection will be used (ie: email
	// domains). If the array is empty or the property is not specified, the
	// connection name will be added as realm.
	Realms []interface{} `json:"realms,omitempty"`

	Metadata map[string]string `json:"metadata,omitempty"`

	// Provisioning Ticket URL is Ticket URL for Active Directory/LDAP, etc.
	ProvisioningTicketURL *string `json:"provisioning_ticket_url,omitempty"`

	// Display connection as a button.
	ShowAsButton *bool `json:"show_as_button,omitempty"`
}

Connection is the relationship between Auth0 and a source of users.

See: https://auth0.com/docs/authenticate/identity-providers

func (*Connection) GetDisplayName

func (c *Connection) GetDisplayName() string

GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.

func (*Connection) GetID

func (c *Connection) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Connection) GetIsDomainConnection

func (c *Connection) GetIsDomainConnection() bool

GetIsDomainConnection returns the IsDomainConnection field if it's non-nil, zero value otherwise.

func (*Connection) GetMetadata added in v0.6.4

func (c *Connection) GetMetadata() map[string]string

GetMetadata returns the Metadata map if it's non-nil, an empty map otherwise.

func (*Connection) GetName

func (c *Connection) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Connection) GetProvisioningTicketURL

func (c *Connection) GetProvisioningTicketURL() string

GetProvisioningTicketURL returns the ProvisioningTicketURL field if it's non-nil, zero value otherwise.

func (*Connection) GetShowAsButton added in v0.6.1

func (c *Connection) GetShowAsButton() bool

GetShowAsButton returns the ShowAsButton field if it's non-nil, zero value otherwise.

func (*Connection) GetStrategy

func (c *Connection) GetStrategy() string

GetStrategy returns the Strategy field if it's non-nil, zero value otherwise.

func (*Connection) MarshalJSON

func (c *Connection) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Connection) String

func (c *Connection) String() string

String returns a string representation of Connection.

func (*Connection) UnmarshalJSON

func (c *Connection) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type ConnectionGatewayAuthentication

type ConnectionGatewayAuthentication struct {
	Method              *string `json:"method,omitempty"`
	Subject             *string `json:"subject,omitempty"`
	Audience            *string `json:"audience,omitempty"`
	Secret              *string `json:"secret,omitempty"`
	SecretBase64Encoded *bool   `json:"secret_base64_encoded,omitempty"`
}

ConnectionGatewayAuthentication is used to configure the GatewayAuthentication settings on a ConnectionOptionsSMS.

func (*ConnectionGatewayAuthentication) GetAudience

func (c *ConnectionGatewayAuthentication) GetAudience() string

GetAudience returns the Audience field if it's non-nil, zero value otherwise.

func (*ConnectionGatewayAuthentication) GetMethod

func (c *ConnectionGatewayAuthentication) GetMethod() string

GetMethod returns the Method field if it's non-nil, zero value otherwise.

func (*ConnectionGatewayAuthentication) GetSecret

func (c *ConnectionGatewayAuthentication) GetSecret() string

GetSecret returns the Secret field if it's non-nil, zero value otherwise.

func (*ConnectionGatewayAuthentication) GetSecretBase64Encoded

func (c *ConnectionGatewayAuthentication) GetSecretBase64Encoded() bool

GetSecretBase64Encoded returns the SecretBase64Encoded field if it's non-nil, zero value otherwise.

func (*ConnectionGatewayAuthentication) GetSubject

func (c *ConnectionGatewayAuthentication) GetSubject() string

GetSubject returns the Subject field if it's non-nil, zero value otherwise.

func (*ConnectionGatewayAuthentication) String

String returns a string representation of ConnectionGatewayAuthentication.

type ConnectionList

type ConnectionList struct {
	List
	Connections []*Connection `json:"connections"`
}

ConnectionList is a list of Connections.

func (*ConnectionList) String

func (c *ConnectionList) String() string

String returns a string representation of ConnectionList.

type ConnectionManager

type ConnectionManager struct {
	*Management
}

ConnectionManager manages Auth0 Connection resources.

func (*ConnectionManager) Create

func (m *ConnectionManager) Create(c *Connection, opts ...RequestOption) error

Create a new connection.

See: https://auth0.com/docs/api/management/v2#!/Connections/post_connections

Example
connection := &management.Connection{
	Name:     auth0.Stringf("Test-Google-OAuth2-%d", time.Now().Unix()),
	Strategy: auth0.String("google-oauth2"),
	Options: &management.ConnectionOptionsGoogleOAuth2{
		ClientID:     auth0.String(""), // replace with your client id
		ClientSecret: auth0.String(""),
		AllowedAudiences: []interface{}{
			"example.com",
			"api.example.com",
		},
		Profile:  auth0.Bool(true),
		Calendar: auth0.Bool(true),
		Youtube:  auth0.Bool(false),
	},
}

defer api.Connection.Delete(connection.GetID())

err := api.Connection.Create(connection)
if err != nil {
	// handle err
	return
}
Output:

func (*ConnectionManager) Delete

func (m *ConnectionManager) Delete(id string, opts ...RequestOption) (err error)

Delete a connection and all its users.

See: https://auth0.com/docs/api/management/v2#!/Connections/delete_connections_by_id

func (*ConnectionManager) List

func (m *ConnectionManager) List(opts ...RequestOption) (c *ConnectionList, err error)

List all connections.

See: https://auth0.com/docs/api/management/v2#!/Connections/get_connections

Example
package main

import (
	"fmt"
	"os"

	"github.com/auth0/go-auth0/management"
)

var api *management.Management

func main() {
	connectionList, err := api.Connection.List(
		management.Parameter("strategy", "auth0"),
	)
	if err != nil {
		// handle err
		return
	}
	for _, connection := range connectionList.Connections {
		fmt.Println(connection.GetName())

		if options, ok := connection.Options.(*management.ConnectionOptions); ok {
			fmt.Printf("\tPassword Policy: %s\n", options.GetPasswordPolicy())
			fmt.Printf("\tMulti-Factor Auth Enabled: %t\n", options.MFA["active"])
		}
	}
}
Output:

func (*ConnectionManager) Read

func (m *ConnectionManager) Read(id string, opts ...RequestOption) (c *Connection, err error)

Read retrieves a connection by its id.

See: https://auth0.com/docs/api/management/v2#!/Connections/get_connections_by_id

func (*ConnectionManager) ReadByName

func (m *ConnectionManager) ReadByName(name string, opts ...RequestOption) (*Connection, error)

ReadByName retrieves a connection by its name. This is a helper method when a connection id is not readily available.

func (*ConnectionManager) Update

func (m *ConnectionManager) Update(id string, c *Connection, opts ...RequestOption) (err error)

Update a connection.

Note: if you use the options' parameter, the whole options object will be overridden, so ensure that all parameters are present.

See: https://auth0.com/docs/api/management/v2#!/Connections/patch_connections_by_id

type ConnectionOptions

type ConnectionOptions struct {
	// Options for multifactor authentication. Can be used to set active and
	// return_enroll_settings.
	MFA map[string]interface{} `json:"mfa,omitempty"`

	// Options for validation.
	Validation map[string]interface{} `json:"validation,omitempty"`

	// Password strength level, can be one of:
	// "none", "low", "fair", "good", "excellent" or null.
	PasswordPolicy *string `json:"passwordPolicy,omitempty"`

	// Options for password history policy.
	PasswordHistory map[string]interface{} `json:"password_history,omitempty"`

	// Options for password expiration policy.
	PasswordNoPersonalInfo map[string]interface{} `json:"password_no_personal_info,omitempty"`

	// Options for password dictionary policy.
	PasswordDictionary map[string]interface{} `json:"password_dictionary,omitempty"`

	// Options for password complexity options.
	PasswordComplexityOptions map[string]interface{} `json:"password_complexity_options,omitempty"`

	EnabledDatabaseCustomization *bool `json:"enabledDatabaseCustomization,omitempty"`

	BruteForceProtection *bool `json:"brute_force_protection,omitempty"`

	ImportMode *bool `json:"import_mode,omitempty"`

	DisableSignup *bool `json:"disable_signup,omitempty"`

	RequiresUsername *bool `json:"requires_username,omitempty"`

	// Scripts for the connection
	// Allowed keys are: "get_user", "login", "create", "verify", "change_password", "delete" or "change_email".
	CustomScripts map[string]interface{} `json:"customScripts,omitempty"`
	// configuration variables that can be used in custom scripts
	Configuration map[string]interface{} `json:"configuration,omitempty"`

	StrategyVersion *int `json:"strategy_version,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptions is used to configure Connections.

func (*ConnectionOptions) GetBruteForceProtection

func (c *ConnectionOptions) GetBruteForceProtection() bool

GetBruteForceProtection returns the BruteForceProtection field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetDisableSignup

func (c *ConnectionOptions) GetDisableSignup() bool

GetDisableSignup returns the DisableSignup field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetEnabledDatabaseCustomization

func (c *ConnectionOptions) GetEnabledDatabaseCustomization() bool

GetEnabledDatabaseCustomization returns the EnabledDatabaseCustomization field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetImportMode

func (c *ConnectionOptions) GetImportMode() bool

GetImportMode returns the ImportMode field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetNonPersistentAttrs

func (c *ConnectionOptions) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetPasswordPolicy

func (c *ConnectionOptions) GetPasswordPolicy() string

GetPasswordPolicy returns the PasswordPolicy field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetRequiresUsername

func (c *ConnectionOptions) GetRequiresUsername() bool

GetRequiresUsername returns the RequiresUsername field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetSetUserAttributes

func (c *ConnectionOptions) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) GetStrategyVersion

func (c *ConnectionOptions) GetStrategyVersion() int

GetStrategyVersion returns the StrategyVersion field if it's non-nil, zero value otherwise.

func (*ConnectionOptions) String

func (c *ConnectionOptions) String() string

String returns a string representation of ConnectionOptions.

type ConnectionOptionsAD

type ConnectionOptionsAD struct {
	TenantDomain  *string       `json:"tenant_domain,omitempty"`
	DomainAliases []interface{} `json:"domain_aliases,omitempty"`
	LogoURL       *string       `json:"icon_url,omitempty"`
	IPs           []interface{} `json:"ips"`

	CertAuth             *bool `json:"certAuth,omitempty"`
	Kerberos             *bool `json:"kerberos,omitempty"`
	DisableCache         *bool `json:"disable_cache,omitempty"`
	BruteForceProtection *bool `json:"brute_force_protection,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsAD is used to configure an AD Connection.

func (*ConnectionOptionsAD) GetBruteForceProtection

func (c *ConnectionOptionsAD) GetBruteForceProtection() bool

GetBruteForceProtection returns the BruteForceProtection field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) GetCertAuth

func (c *ConnectionOptionsAD) GetCertAuth() bool

GetCertAuth returns the CertAuth field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) GetDisableCache

func (c *ConnectionOptionsAD) GetDisableCache() bool

GetDisableCache returns the DisableCache field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) GetKerberos

func (c *ConnectionOptionsAD) GetKerberos() bool

GetKerberos returns the Kerberos field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) GetLogoURL

func (c *ConnectionOptionsAD) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) GetNonPersistentAttrs

func (c *ConnectionOptionsAD) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) GetSetUserAttributes

func (c *ConnectionOptionsAD) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) GetTenantDomain

func (c *ConnectionOptionsAD) GetTenantDomain() string

GetTenantDomain returns the TenantDomain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAD) String

func (c *ConnectionOptionsAD) String() string

String returns a string representation of ConnectionOptionsAD.

type ConnectionOptionsADFS

type ConnectionOptionsADFS struct {
	TenantDomain  *string       `json:"tenant_domain,omitempty"`
	DomainAliases []interface{} `json:"domain_aliases,omitempty"`
	LogoURL       *string       `json:"icon_url,omitempty"`
	ADFSServer    *string       `json:"adfs_server,omitempty"`

	EnableUsersAPI *bool `json:"api_enable_users,omitempty"`

	// Set to on_first_login to avoid setting user attributes at each login.
	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsADFS is used to configure an ADFS Connection.

func (*ConnectionOptionsADFS) GetADFSServer

func (c *ConnectionOptionsADFS) GetADFSServer() string

GetADFSServer returns the ADFSServer field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsADFS) GetEnableUsersAPI

func (c *ConnectionOptionsADFS) GetEnableUsersAPI() bool

GetEnableUsersAPI returns the EnableUsersAPI field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsADFS) GetLogoURL

func (c *ConnectionOptionsADFS) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsADFS) GetNonPersistentAttrs

func (c *ConnectionOptionsADFS) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsADFS) GetSetUserAttributes

func (c *ConnectionOptionsADFS) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsADFS) GetTenantDomain

func (c *ConnectionOptionsADFS) GetTenantDomain() string

GetTenantDomain returns the TenantDomain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsADFS) String

func (c *ConnectionOptionsADFS) String() string

String returns a string representation of ConnectionOptionsADFS.

type ConnectionOptionsApple

type ConnectionOptionsApple struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"app_secret,omitempty"`

	TeamID *string `json:"team_id,omitempty"`
	KeyID  *string `json:"kid,omitempty"`

	Name  *bool `json:"name,omitempty" scope:"name"`
	Email *bool `json:"email,omitempty" scope:"email"`

	Scope              *string   `json:"scope,omitempty"`
	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsApple is used to configure an Apple Connection.

func (*ConnectionOptionsApple) GetClientID

func (c *ConnectionOptionsApple) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetClientSecret

func (c *ConnectionOptionsApple) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetEmail

func (c *ConnectionOptionsApple) GetEmail() bool

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetKeyID

func (c *ConnectionOptionsApple) GetKeyID() string

GetKeyID returns the KeyID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetName

func (c *ConnectionOptionsApple) GetName() bool

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetNonPersistentAttrs

func (c *ConnectionOptionsApple) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetScope

func (c *ConnectionOptionsApple) GetScope() string

GetScope returns the Scope field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetSetUserAttributes

func (c *ConnectionOptionsApple) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) GetTeamID

func (c *ConnectionOptionsApple) GetTeamID() string

GetTeamID returns the TeamID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsApple) Scopes

func (c *ConnectionOptionsApple) Scopes() []string

Scopes returns the scopes for ConnectionOptionsApple.

func (*ConnectionOptionsApple) SetScopes

func (c *ConnectionOptionsApple) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsApple.

func (*ConnectionOptionsApple) String

func (c *ConnectionOptionsApple) String() string

String returns a string representation of ConnectionOptionsApple.

type ConnectionOptionsAzureAD

type ConnectionOptionsAzureAD struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	AppID         *string       `json:"app_id,omitempty"`
	TenantDomain  *string       `json:"tenant_domain,omitempty"`
	Domain        *string       `json:"domain,omitempty"`
	DomainAliases []interface{} `json:"domain_aliases,omitempty"`
	LogoURL       *string       `json:"icon_url,omitempty"`

	IdentityAPI *string `json:"identity_api"`

	WAADProtocol       *string `json:"waad_protocol,omitempty"`
	WAADCommonEndpoint *bool   `json:"waad_common_endpoint,omitempty"`

	UseWSFederation     *bool   `json:"use_wsfed,omitempty"`
	UseCommonEndpoint   *bool   `json:"useCommonEndpoint,omitempty"`
	EnableUsersAPI      *bool   `json:"api_enable_users,omitempty"`
	MaxGroupsToRetrieve *string `json:"max_groups_to_retrieve,omitempty"`

	BasicProfile    *bool `json:"basic_profile,omitempty" scope:"basic_profile"`
	ExtendedProfile *bool `json:"ext_profile,omitempty" scope:"ext_profile"`
	Groups          *bool `json:"ext_groups,omitempty" scope:"ext_groups"`
	NestedGroups    *bool `json:"ext_nested_groups,omitempty" scope:"ext_nested_groups"`
	Admin           *bool `json:"ext_admin,omitempty" scope:"ext_admin"`
	IsSuspended     *bool `json:"ext_is_suspended,omitempty" scope:"ext_is_suspended"`
	AgreedTerms     *bool `json:"ext_agreed_terms,omitempty" scope:"ext_agreed_terms"`
	AssignedPlans   *bool `json:"ext_assigned_plans,omitempty" scope:"ext_assigned_plans"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	TrustEmailVerified *string   `json:"should_trust_email_verified_connection,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsAzureAD is used to configure an AzureAD Connection.

func (*ConnectionOptionsAzureAD) GetAdmin

func (c *ConnectionOptionsAzureAD) GetAdmin() bool

GetAdmin returns the Admin field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetAgreedTerms

func (c *ConnectionOptionsAzureAD) GetAgreedTerms() bool

GetAgreedTerms returns the AgreedTerms field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetAppID

func (c *ConnectionOptionsAzureAD) GetAppID() string

GetAppID returns the AppID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetAssignedPlans

func (c *ConnectionOptionsAzureAD) GetAssignedPlans() bool

GetAssignedPlans returns the AssignedPlans field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetBasicProfile

func (c *ConnectionOptionsAzureAD) GetBasicProfile() bool

GetBasicProfile returns the BasicProfile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetClientID

func (c *ConnectionOptionsAzureAD) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetClientSecret

func (c *ConnectionOptionsAzureAD) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetDomain

func (c *ConnectionOptionsAzureAD) GetDomain() string

GetDomain returns the Domain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetEnableUsersAPI

func (c *ConnectionOptionsAzureAD) GetEnableUsersAPI() bool

GetEnableUsersAPI returns the EnableUsersAPI field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetExtendedProfile

func (c *ConnectionOptionsAzureAD) GetExtendedProfile() bool

GetExtendedProfile returns the ExtendedProfile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetGroups

func (c *ConnectionOptionsAzureAD) GetGroups() bool

GetGroups returns the Groups field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetIdentityAPI

func (c *ConnectionOptionsAzureAD) GetIdentityAPI() string

GetIdentityAPI returns the IdentityAPI field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetIsSuspended

func (c *ConnectionOptionsAzureAD) GetIsSuspended() bool

GetIsSuspended returns the IsSuspended field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetLogoURL

func (c *ConnectionOptionsAzureAD) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetMaxGroupsToRetrieve

func (c *ConnectionOptionsAzureAD) GetMaxGroupsToRetrieve() string

GetMaxGroupsToRetrieve returns the MaxGroupsToRetrieve field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetNestedGroups

func (c *ConnectionOptionsAzureAD) GetNestedGroups() bool

GetNestedGroups returns the NestedGroups field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetNonPersistentAttrs

func (c *ConnectionOptionsAzureAD) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetSetUserAttributes

func (c *ConnectionOptionsAzureAD) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetTenantDomain

func (c *ConnectionOptionsAzureAD) GetTenantDomain() string

GetTenantDomain returns the TenantDomain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetTrustEmailVerified

func (c *ConnectionOptionsAzureAD) GetTrustEmailVerified() string

GetTrustEmailVerified returns the TrustEmailVerified field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetUseCommonEndpoint

func (c *ConnectionOptionsAzureAD) GetUseCommonEndpoint() bool

GetUseCommonEndpoint returns the UseCommonEndpoint field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetUseWSFederation

func (c *ConnectionOptionsAzureAD) GetUseWSFederation() bool

GetUseWSFederation returns the UseWSFederation field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetWAADCommonEndpoint

func (c *ConnectionOptionsAzureAD) GetWAADCommonEndpoint() bool

GetWAADCommonEndpoint returns the WAADCommonEndpoint field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) GetWAADProtocol

func (c *ConnectionOptionsAzureAD) GetWAADProtocol() string

GetWAADProtocol returns the WAADProtocol field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsAzureAD) Scopes

func (c *ConnectionOptionsAzureAD) Scopes() []string

Scopes returns the scopes for ConnectionOptionsAzureAD.

func (*ConnectionOptionsAzureAD) SetScopes

func (c *ConnectionOptionsAzureAD) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsAzureAD.

func (*ConnectionOptionsAzureAD) String

func (c *ConnectionOptionsAzureAD) String() string

String returns a string representation of ConnectionOptionsAzureAD.

type ConnectionOptionsEmail

type ConnectionOptionsEmail struct {
	Name  *string                         `json:"name,omitempty"`
	Email *ConnectionOptionsEmailSettings `json:"email,omitempty"`

	OTP *ConnectionOptionsOTP `json:"totp,omitempty"`

	AuthParams interface{} `json:"authParams,omitempty"`

	DisableSignup        *bool     `json:"disable_signup,omitempty"`
	BruteForceProtection *bool     `json:"brute_force_protection,omitempty"`
	SetUserAttributes    *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs   *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsEmail is used to configure an Email Connection.

func (*ConnectionOptionsEmail) GetBruteForceProtection

func (c *ConnectionOptionsEmail) GetBruteForceProtection() bool

GetBruteForceProtection returns the BruteForceProtection field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmail) GetDisableSignup

func (c *ConnectionOptionsEmail) GetDisableSignup() bool

GetDisableSignup returns the DisableSignup field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmail) GetEmail

GetEmail returns the Email field.

func (*ConnectionOptionsEmail) GetName

func (c *ConnectionOptionsEmail) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmail) GetNonPersistentAttrs

func (c *ConnectionOptionsEmail) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmail) GetOTP

GetOTP returns the OTP field.

func (*ConnectionOptionsEmail) GetSetUserAttributes

func (c *ConnectionOptionsEmail) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmail) String

func (c *ConnectionOptionsEmail) String() string

String returns a string representation of ConnectionOptionsEmail.

type ConnectionOptionsEmailSettings

type ConnectionOptionsEmailSettings struct {
	Syntax  *string `json:"syntax,omitempty"`
	From    *string `json:"from,omitempty"`
	Subject *string `json:"subject,omitempty"`
	Body    *string `json:"body,omitempty"`
}

ConnectionOptionsEmailSettings is used to configure the email settings on a ConnectionOptionsEmail.

func (*ConnectionOptionsEmailSettings) GetBody

GetBody returns the Body field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmailSettings) GetFrom

GetFrom returns the From field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmailSettings) GetSubject

func (c *ConnectionOptionsEmailSettings) GetSubject() string

GetSubject returns the Subject field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmailSettings) GetSyntax

func (c *ConnectionOptionsEmailSettings) GetSyntax() string

GetSyntax returns the Syntax field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsEmailSettings) String

String returns a string representation of ConnectionOptionsEmailSettings.

type ConnectionOptionsFacebook

type ConnectionOptionsFacebook struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	AllowContextProfileField    *bool     `json:"allow_context_profile_field,omitempty"`
	Email                       *bool     `json:"email,omitempty" scope:"email"`
	GroupsAccessMemberInfo      *bool     `json:"groups_access_member_info,omitempty" scope:"groups_access_member_info"`
	PublishToGroups             *bool     `json:"publish_to_groups,omitempty" scope:"publish_to_groups"`
	UserAgeRange                *bool     `json:"user_age_range,omitempty" scope:"user_age_range"`
	UserBirthday                *bool     `json:"user_birthday,omitempty" scope:"user_birthday"`
	AdsManagement               *bool     `json:"ads_management,omitempty" scope:"ads_management"`
	AdsRead                     *bool     `json:"ads_read,omitempty" scope:"ads_read"`
	ReadAudienceNetworkInsights *bool     `json:"read_audience_network_insights,omitempty" scope:"read_audience_network_insights"`
	ReadInsights                *bool     `json:"read_insights,omitempty" scope:"read_insights"`
	ManageNotifications         *bool     `json:"manage_notifications,omitempty" scope:"manage_notifications"`
	PublishActions              *bool     `json:"publish_actions,omitempty" scope:"publish_actions"`
	ReadMailbox                 *bool     `json:"read_mailbox,omitempty" scope:"read_mailbox"`
	PublicProfile               *bool     `json:"public_profile,omitempty" scope:"public_profile"`
	UserEvents                  *bool     `json:"user_events,omitempty" scope:"user_events"`
	UserFriends                 *bool     `json:"user_friends,omitempty" scope:"user_friends"`
	UserGender                  *bool     `json:"user_gender,omitempty" scope:"user_gender"`
	UserHometown                *bool     `json:"user_hometown,omitempty" scope:"user_hometown"`
	UserLikes                   *bool     `json:"user_likes,omitempty" scope:"user_likes"`
	UserLink                    *bool     `json:"user_link,omitempty" scope:"user_link"`
	UserLocation                *bool     `json:"user_location,omitempty" scope:"user_location"`
	UserPhotos                  *bool     `json:"user_photos,omitempty" scope:"user_photos"`
	UserPosts                   *bool     `json:"user_posts,omitempty" scope:"user_posts"`
	UserTaggedPlaces            *bool     `json:"user_tagged_places,omitempty" scope:"user_tagged_places"`
	UserVideos                  *bool     `json:"user_videos,omitempty" scope:"user_videos"`
	BusinessManagement          *bool     `json:"business_management,omitempty" scope:"business_management"`
	LeadsRetrieval              *bool     `json:"leads_retrieval,omitempty" scope:"leads_retrieval"`
	ManagePages                 *bool     `json:"manage_pages,omitempty" scope:"manage_pages"`
	PagesManageCTA              *bool     `json:"pages_manage_cta,omitempty" scope:"pages_manage_cta"`
	PagesManageInstantArticles  *bool     `json:"pages_manage_instant_articles,omitempty" scope:"pages_manage_instant_articles"`
	PagesShowList               *bool     `json:"pages_show_list,omitempty" scope:"pages_show_list"`
	PagesMessaging              *bool     `json:"pages_messaging,omitempty" scope:"pages_messaging"`
	PagesMessagingPhoneNumber   *bool     `json:"pages_messaging_phone_number,omitempty" scope:"pages_messaging_phone_number"`
	PagesMessagingSubscriptions *bool     `json:"pages_messaging_subscriptions,omitempty" scope:"pages_messaging_subscriptions"`
	PublishPages                *bool     `json:"publish_pages,omitempty" scope:"publish_pages"`
	PublishVideo                *bool     `json:"publish_video,omitempty" scope:"publish_video"`
	ReadPageMailboxes           *bool     `json:"read_page_mailboxes,omitempty" scope:"read_page_mailboxes"`
	ReadStream                  *bool     `json:"read_stream,omitempty" scope:"read_stream"`
	UserGroups                  *bool     `json:"user_groups,omitempty" scope:"user_groups"`
	UserManagedGroups           *bool     `json:"user_managed_groups,omitempty" scope:"user_managed_groups"`
	UserStatus                  *bool     `json:"user_status,omitempty" scope:"user_status"`
	SetUserAttributes           *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs          *[]string `json:"non_persistent_attrs,omitempty"`

	// Scope is a comma separated list of scopes.
	Scope *string `json:"scope,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsFacebook is used to configure a Facebook Connection.

func (*ConnectionOptionsFacebook) GetAdsManagement

func (c *ConnectionOptionsFacebook) GetAdsManagement() bool

GetAdsManagement returns the AdsManagement field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetAdsRead

func (c *ConnectionOptionsFacebook) GetAdsRead() bool

GetAdsRead returns the AdsRead field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetAllowContextProfileField

func (c *ConnectionOptionsFacebook) GetAllowContextProfileField() bool

GetAllowContextProfileField returns the AllowContextProfileField field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetBusinessManagement

func (c *ConnectionOptionsFacebook) GetBusinessManagement() bool

GetBusinessManagement returns the BusinessManagement field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetClientID

func (c *ConnectionOptionsFacebook) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetClientSecret

func (c *ConnectionOptionsFacebook) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetEmail

func (c *ConnectionOptionsFacebook) GetEmail() bool

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetGroupsAccessMemberInfo

func (c *ConnectionOptionsFacebook) GetGroupsAccessMemberInfo() bool

GetGroupsAccessMemberInfo returns the GroupsAccessMemberInfo field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetLeadsRetrieval

func (c *ConnectionOptionsFacebook) GetLeadsRetrieval() bool

GetLeadsRetrieval returns the LeadsRetrieval field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetManageNotifications

func (c *ConnectionOptionsFacebook) GetManageNotifications() bool

GetManageNotifications returns the ManageNotifications field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetManagePages

func (c *ConnectionOptionsFacebook) GetManagePages() bool

GetManagePages returns the ManagePages field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetNonPersistentAttrs

func (c *ConnectionOptionsFacebook) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPagesManageCTA

func (c *ConnectionOptionsFacebook) GetPagesManageCTA() bool

GetPagesManageCTA returns the PagesManageCTA field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPagesManageInstantArticles

func (c *ConnectionOptionsFacebook) GetPagesManageInstantArticles() bool

GetPagesManageInstantArticles returns the PagesManageInstantArticles field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPagesMessaging

func (c *ConnectionOptionsFacebook) GetPagesMessaging() bool

GetPagesMessaging returns the PagesMessaging field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPagesMessagingPhoneNumber

func (c *ConnectionOptionsFacebook) GetPagesMessagingPhoneNumber() bool

GetPagesMessagingPhoneNumber returns the PagesMessagingPhoneNumber field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPagesMessagingSubscriptions

func (c *ConnectionOptionsFacebook) GetPagesMessagingSubscriptions() bool

GetPagesMessagingSubscriptions returns the PagesMessagingSubscriptions field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPagesShowList

func (c *ConnectionOptionsFacebook) GetPagesShowList() bool

GetPagesShowList returns the PagesShowList field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPublicProfile

func (c *ConnectionOptionsFacebook) GetPublicProfile() bool

GetPublicProfile returns the PublicProfile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPublishActions

func (c *ConnectionOptionsFacebook) GetPublishActions() bool

GetPublishActions returns the PublishActions field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPublishPages

func (c *ConnectionOptionsFacebook) GetPublishPages() bool

GetPublishPages returns the PublishPages field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPublishToGroups

func (c *ConnectionOptionsFacebook) GetPublishToGroups() bool

GetPublishToGroups returns the PublishToGroups field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetPublishVideo

func (c *ConnectionOptionsFacebook) GetPublishVideo() bool

GetPublishVideo returns the PublishVideo field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetReadAudienceNetworkInsights

func (c *ConnectionOptionsFacebook) GetReadAudienceNetworkInsights() bool

GetReadAudienceNetworkInsights returns the ReadAudienceNetworkInsights field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetReadInsights

func (c *ConnectionOptionsFacebook) GetReadInsights() bool

GetReadInsights returns the ReadInsights field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetReadMailbox

func (c *ConnectionOptionsFacebook) GetReadMailbox() bool

GetReadMailbox returns the ReadMailbox field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetReadPageMailboxes

func (c *ConnectionOptionsFacebook) GetReadPageMailboxes() bool

GetReadPageMailboxes returns the ReadPageMailboxes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetReadStream

func (c *ConnectionOptionsFacebook) GetReadStream() bool

GetReadStream returns the ReadStream field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetScope

func (c *ConnectionOptionsFacebook) GetScope() string

GetScope returns the Scope field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetSetUserAttributes

func (c *ConnectionOptionsFacebook) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserAgeRange

func (c *ConnectionOptionsFacebook) GetUserAgeRange() bool

GetUserAgeRange returns the UserAgeRange field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserBirthday

func (c *ConnectionOptionsFacebook) GetUserBirthday() bool

GetUserBirthday returns the UserBirthday field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserEvents

func (c *ConnectionOptionsFacebook) GetUserEvents() bool

GetUserEvents returns the UserEvents field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserFriends

func (c *ConnectionOptionsFacebook) GetUserFriends() bool

GetUserFriends returns the UserFriends field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserGender

func (c *ConnectionOptionsFacebook) GetUserGender() bool

GetUserGender returns the UserGender field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserGroups

func (c *ConnectionOptionsFacebook) GetUserGroups() bool

GetUserGroups returns the UserGroups field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserHometown

func (c *ConnectionOptionsFacebook) GetUserHometown() bool

GetUserHometown returns the UserHometown field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserLikes

func (c *ConnectionOptionsFacebook) GetUserLikes() bool

GetUserLikes returns the UserLikes field if it's non-nil, zero value otherwise.

func (c *ConnectionOptionsFacebook) GetUserLink() bool

GetUserLink returns the UserLink field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserLocation

func (c *ConnectionOptionsFacebook) GetUserLocation() bool

GetUserLocation returns the UserLocation field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserManagedGroups

func (c *ConnectionOptionsFacebook) GetUserManagedGroups() bool

GetUserManagedGroups returns the UserManagedGroups field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserPhotos

func (c *ConnectionOptionsFacebook) GetUserPhotos() bool

GetUserPhotos returns the UserPhotos field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserPosts

func (c *ConnectionOptionsFacebook) GetUserPosts() bool

GetUserPosts returns the UserPosts field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserStatus

func (c *ConnectionOptionsFacebook) GetUserStatus() bool

GetUserStatus returns the UserStatus field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserTaggedPlaces

func (c *ConnectionOptionsFacebook) GetUserTaggedPlaces() bool

GetUserTaggedPlaces returns the UserTaggedPlaces field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) GetUserVideos

func (c *ConnectionOptionsFacebook) GetUserVideos() bool

GetUserVideos returns the UserVideos field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsFacebook) Scopes

func (c *ConnectionOptionsFacebook) Scopes() []string

Scopes returns the scopes for ConnectionOptionsFacebook.

func (*ConnectionOptionsFacebook) SetScopes

func (c *ConnectionOptionsFacebook) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsFacebook.

func (*ConnectionOptionsFacebook) String

func (c *ConnectionOptionsFacebook) String() string

String returns a string representation of ConnectionOptionsFacebook.

type ConnectionOptionsGitHub

type ConnectionOptionsGitHub struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	Email          *bool `json:"email,omitempty" scope:"email"`
	ReadUser       *bool `json:"read_user,omitempty" scope:"read_user"`
	Follow         *bool `json:"follow,omitempty" scope:"follow"`
	PublicRepo     *bool `json:"public_repo,omitempty" scope:"public_repo"`
	Repo           *bool `json:"repo,omitempty" scope:"repo"`
	RepoDeployment *bool `json:"repo_deployment,omitempty" scope:"repo_deployment"`
	RepoStatus     *bool `json:"repo_status,omitempty" scope:"repo_status"`
	DeleteRepo     *bool `json:"delete_repo,omitempty" scope:"delete_repo"`
	Notifications  *bool `json:"notifications,omitempty" scope:"notifications"`
	Gist           *bool `json:"gist,omitempty" scope:"gist"`
	ReadRepoHook   *bool `json:"read_repo_hook,omitempty" scope:"read_repo_hook"`
	WriteRepoHook  *bool `json:"write_repo_hook,omitempty" scope:"write_repo_hook"`
	AdminRepoHook  *bool `json:"admin_repo_hook,omitempty" scope:"admin_repo_hook"`
	ReadOrg        *bool `json:"read_org,omitempty" scope:"read_org"`
	AdminOrg       *bool `json:"admin_org,omitempty" scope:"admin_org"`
	ReadPublicKey  *bool `json:"read_public_key,omitempty" scope:"read_public_key"`
	WritePublicKey *bool `json:"write_public_key,omitempty" scope:"write_public_key"`
	AdminPublicKey *bool `json:"admin_public_key,omitempty" scope:"admin_public_key"`
	WriteOrg       *bool `json:"write_org,omitempty" scope:"write_org"`
	Profile        *bool `json:"profile,omitempty" scope:"profile"`

	Scope []interface{} `json:"scope,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsGitHub is used to configure a GitHub Connection.

func (*ConnectionOptionsGitHub) GetAdminOrg

func (c *ConnectionOptionsGitHub) GetAdminOrg() bool

GetAdminOrg returns the AdminOrg field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetAdminPublicKey

func (c *ConnectionOptionsGitHub) GetAdminPublicKey() bool

GetAdminPublicKey returns the AdminPublicKey field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetAdminRepoHook

func (c *ConnectionOptionsGitHub) GetAdminRepoHook() bool

GetAdminRepoHook returns the AdminRepoHook field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetClientID

func (c *ConnectionOptionsGitHub) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetClientSecret

func (c *ConnectionOptionsGitHub) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetDeleteRepo

func (c *ConnectionOptionsGitHub) GetDeleteRepo() bool

GetDeleteRepo returns the DeleteRepo field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetEmail

func (c *ConnectionOptionsGitHub) GetEmail() bool

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetFollow

func (c *ConnectionOptionsGitHub) GetFollow() bool

GetFollow returns the Follow field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetGist

func (c *ConnectionOptionsGitHub) GetGist() bool

GetGist returns the Gist field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetNonPersistentAttrs

func (c *ConnectionOptionsGitHub) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetNotifications

func (c *ConnectionOptionsGitHub) GetNotifications() bool

GetNotifications returns the Notifications field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetProfile

func (c *ConnectionOptionsGitHub) GetProfile() bool

GetProfile returns the Profile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetPublicRepo

func (c *ConnectionOptionsGitHub) GetPublicRepo() bool

GetPublicRepo returns the PublicRepo field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetReadOrg

func (c *ConnectionOptionsGitHub) GetReadOrg() bool

GetReadOrg returns the ReadOrg field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetReadPublicKey

func (c *ConnectionOptionsGitHub) GetReadPublicKey() bool

GetReadPublicKey returns the ReadPublicKey field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetReadRepoHook

func (c *ConnectionOptionsGitHub) GetReadRepoHook() bool

GetReadRepoHook returns the ReadRepoHook field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetReadUser

func (c *ConnectionOptionsGitHub) GetReadUser() bool

GetReadUser returns the ReadUser field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetRepo

func (c *ConnectionOptionsGitHub) GetRepo() bool

GetRepo returns the Repo field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetRepoDeployment

func (c *ConnectionOptionsGitHub) GetRepoDeployment() bool

GetRepoDeployment returns the RepoDeployment field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetRepoStatus

func (c *ConnectionOptionsGitHub) GetRepoStatus() bool

GetRepoStatus returns the RepoStatus field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetSetUserAttributes

func (c *ConnectionOptionsGitHub) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetWriteOrg

func (c *ConnectionOptionsGitHub) GetWriteOrg() bool

GetWriteOrg returns the WriteOrg field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetWritePublicKey

func (c *ConnectionOptionsGitHub) GetWritePublicKey() bool

GetWritePublicKey returns the WritePublicKey field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) GetWriteRepoHook

func (c *ConnectionOptionsGitHub) GetWriteRepoHook() bool

GetWriteRepoHook returns the WriteRepoHook field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGitHub) Scopes

func (c *ConnectionOptionsGitHub) Scopes() []string

Scopes returns the scopes for ConnectionOptionsGitHub.

func (*ConnectionOptionsGitHub) SetScopes

func (c *ConnectionOptionsGitHub) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsGitHub.

func (*ConnectionOptionsGitHub) String

func (c *ConnectionOptionsGitHub) String() string

String returns a string representation of ConnectionOptionsGitHub.

type ConnectionOptionsGoogleApps

type ConnectionOptionsGoogleApps struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`
	Domain       *string `json:"domain,omitempty"`
	TenantDomain *string `json:"tenant_domain,omitempty"`

	EnableUsersAPI  *bool `json:"api_enable_users,omitempty"`
	BasicProfile    *bool `json:"basic_profile,omitempty" scope:"basic_profile"`
	ExtendedProfile *bool `json:"ext_profile,omitempty" scope:"ext_profile"`
	Groups          *bool `json:"ext_groups,omitempty" scope:"ext_groups"`
	Admin           *bool `json:"ext_is_admin,omitempty" scope:"ext_is_admin"`
	IsSuspended     *bool `json:"ext_is_suspended,omitempty" scope:"ext_is_suspended"`
	AgreedTerms     *bool `json:"ext_agreed_terms,omitempty" scope:"ext_agreed_terms"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	DomainAliases []interface{} `json:"domain_aliases,omitempty"`
	LogoURL       *string       `json:"icon_url,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsGoogleApps is used to configure a GoogleApps Connection.

func (*ConnectionOptionsGoogleApps) GetAdmin

func (c *ConnectionOptionsGoogleApps) GetAdmin() bool

GetAdmin returns the Admin field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetAgreedTerms

func (c *ConnectionOptionsGoogleApps) GetAgreedTerms() bool

GetAgreedTerms returns the AgreedTerms field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetBasicProfile

func (c *ConnectionOptionsGoogleApps) GetBasicProfile() bool

GetBasicProfile returns the BasicProfile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetClientID

func (c *ConnectionOptionsGoogleApps) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetClientSecret

func (c *ConnectionOptionsGoogleApps) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetDomain

func (c *ConnectionOptionsGoogleApps) GetDomain() string

GetDomain returns the Domain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetEnableUsersAPI

func (c *ConnectionOptionsGoogleApps) GetEnableUsersAPI() bool

GetEnableUsersAPI returns the EnableUsersAPI field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetExtendedProfile

func (c *ConnectionOptionsGoogleApps) GetExtendedProfile() bool

GetExtendedProfile returns the ExtendedProfile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetGroups

func (c *ConnectionOptionsGoogleApps) GetGroups() bool

GetGroups returns the Groups field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetIsSuspended

func (c *ConnectionOptionsGoogleApps) GetIsSuspended() bool

GetIsSuspended returns the IsSuspended field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetLogoURL

func (c *ConnectionOptionsGoogleApps) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetNonPersistentAttrs

func (c *ConnectionOptionsGoogleApps) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetSetUserAttributes

func (c *ConnectionOptionsGoogleApps) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) GetTenantDomain

func (c *ConnectionOptionsGoogleApps) GetTenantDomain() string

GetTenantDomain returns the TenantDomain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleApps) Scopes

func (c *ConnectionOptionsGoogleApps) Scopes() []string

Scopes returns the scopes for ConnectionOptionsGoogleApps.

func (*ConnectionOptionsGoogleApps) SetScopes

func (c *ConnectionOptionsGoogleApps) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsGoogleApps.

func (*ConnectionOptionsGoogleApps) String

func (c *ConnectionOptionsGoogleApps) String() string

String returns a string representation of ConnectionOptionsGoogleApps.

type ConnectionOptionsGoogleOAuth2

type ConnectionOptionsGoogleOAuth2 struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	AllowedAudiences []interface{} `json:"allowed_audiences,omitempty"`

	Email                  *bool         `json:"email,omitempty" scope:"email"`
	Profile                *bool         `json:"profile,omitempty" scope:"profile"`
	Contacts               *bool         `json:"contacts,omitempty" scope:"contacts"`
	Blogger                *bool         `json:"blogger,omitempty" scope:"blogger"`
	Calendar               *bool         `json:"calendar,omitempty" scope:"calendar"`
	Gmail                  *bool         `json:"gmail,omitempty" scope:"gmail"`
	GooglePlus             *bool         `json:"google_plus,omitempty" scope:"google_plus"`
	Orkut                  *bool         `json:"orkut,omitempty" scope:"orkut"`
	PicasaWeb              *bool         `json:"picasa_web,omitempty" scope:"picasa_web"`
	Tasks                  *bool         `json:"tasks,omitempty" scope:"tasks"`
	Youtube                *bool         `json:"youtube,omitempty" scope:"youtube"`
	AdsenseManagement      *bool         `json:"adsense_management,omitempty" scope:"adsense_management"`
	GoogleAffiliateNetwork *bool         `json:"google_affiliate_network,omitempty" scope:"google_affiliate_network"`
	Analytics              *bool         `json:"analytics,omitempty" scope:"analytics"`
	GoogleBooks            *bool         `json:"google_books,omitempty" scope:"google_books"`
	GoogleCloudStorage     *bool         `json:"google_cloud_storage,omitempty" scope:"google_cloud_storage"`
	ContentAPIForShopping  *bool         `json:"content_api_for_shopping,omitempty" scope:"content_api_for_shopping"`
	ChromeWebStore         *bool         `json:"chrome_web_store,omitempty" scope:"chrome_web_store"`
	DocumentList           *bool         `json:"document_list,omitempty" scope:"document_list"`
	GoogleDrive            *bool         `json:"google_drive,omitempty" scope:"google_drive"`
	GoogleDriveFiles       *bool         `json:"google_drive_files,omitempty" scope:"google_drive_files"`
	LatitudeBest           *bool         `json:"latitude_best,omitempty" scope:"latitude_best"`
	LatitudeCity           *bool         `json:"latitude_city,omitempty" scope:"latitude_city"`
	Moderator              *bool         `json:"moderator,omitempty" scope:"moderator"`
	Sites                  *bool         `json:"sites,omitempty" scope:"sites"`
	Spreadsheets           *bool         `json:"spreadsheets,omitempty" scope:"spreadsheets"`
	URLShortener           *bool         `json:"url_shortener,omitempty" scope:"url_shortener"`
	WebmasterTools         *bool         `json:"webmaster_tools,omitempty" scope:"webmaster_tools"`
	Coordinate             *bool         `json:"coordinate,omitempty" scope:"coordinate"`
	CoordinateReadonly     *bool         `json:"coordinate_readonly,omitempty" scope:"coordinate_readonly"`
	SetUserAttributes      *string       `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs     *[]string     `json:"non_persistent_attrs,omitempty"`
	Scope                  []interface{} `json:"scope,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsGoogleOAuth2 is used to configure a GoogleOAuth2 Connection.

func (*ConnectionOptionsGoogleOAuth2) GetAdsenseManagement

func (c *ConnectionOptionsGoogleOAuth2) GetAdsenseManagement() bool

GetAdsenseManagement returns the AdsenseManagement field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetAnalytics

func (c *ConnectionOptionsGoogleOAuth2) GetAnalytics() bool

GetAnalytics returns the Analytics field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetBlogger

func (c *ConnectionOptionsGoogleOAuth2) GetBlogger() bool

GetBlogger returns the Blogger field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetCalendar

func (c *ConnectionOptionsGoogleOAuth2) GetCalendar() bool

GetCalendar returns the Calendar field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetChromeWebStore

func (c *ConnectionOptionsGoogleOAuth2) GetChromeWebStore() bool

GetChromeWebStore returns the ChromeWebStore field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetClientID

func (c *ConnectionOptionsGoogleOAuth2) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetClientSecret

func (c *ConnectionOptionsGoogleOAuth2) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetContacts

func (c *ConnectionOptionsGoogleOAuth2) GetContacts() bool

GetContacts returns the Contacts field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetContentAPIForShopping

func (c *ConnectionOptionsGoogleOAuth2) GetContentAPIForShopping() bool

GetContentAPIForShopping returns the ContentAPIForShopping field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetCoordinate

func (c *ConnectionOptionsGoogleOAuth2) GetCoordinate() bool

GetCoordinate returns the Coordinate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetCoordinateReadonly

func (c *ConnectionOptionsGoogleOAuth2) GetCoordinateReadonly() bool

GetCoordinateReadonly returns the CoordinateReadonly field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetDocumentList

func (c *ConnectionOptionsGoogleOAuth2) GetDocumentList() bool

GetDocumentList returns the DocumentList field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetEmail

func (c *ConnectionOptionsGoogleOAuth2) GetEmail() bool

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetGmail

func (c *ConnectionOptionsGoogleOAuth2) GetGmail() bool

GetGmail returns the Gmail field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetGoogleAffiliateNetwork

func (c *ConnectionOptionsGoogleOAuth2) GetGoogleAffiliateNetwork() bool

GetGoogleAffiliateNetwork returns the GoogleAffiliateNetwork field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetGoogleBooks

func (c *ConnectionOptionsGoogleOAuth2) GetGoogleBooks() bool

GetGoogleBooks returns the GoogleBooks field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetGoogleCloudStorage

func (c *ConnectionOptionsGoogleOAuth2) GetGoogleCloudStorage() bool

GetGoogleCloudStorage returns the GoogleCloudStorage field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetGoogleDrive

func (c *ConnectionOptionsGoogleOAuth2) GetGoogleDrive() bool

GetGoogleDrive returns the GoogleDrive field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetGoogleDriveFiles

func (c *ConnectionOptionsGoogleOAuth2) GetGoogleDriveFiles() bool

GetGoogleDriveFiles returns the GoogleDriveFiles field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetGooglePlus

func (c *ConnectionOptionsGoogleOAuth2) GetGooglePlus() bool

GetGooglePlus returns the GooglePlus field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetLatitudeBest

func (c *ConnectionOptionsGoogleOAuth2) GetLatitudeBest() bool

GetLatitudeBest returns the LatitudeBest field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetLatitudeCity

func (c *ConnectionOptionsGoogleOAuth2) GetLatitudeCity() bool

GetLatitudeCity returns the LatitudeCity field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetModerator

func (c *ConnectionOptionsGoogleOAuth2) GetModerator() bool

GetModerator returns the Moderator field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetNonPersistentAttrs

func (c *ConnectionOptionsGoogleOAuth2) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetOrkut

func (c *ConnectionOptionsGoogleOAuth2) GetOrkut() bool

GetOrkut returns the Orkut field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetPicasaWeb

func (c *ConnectionOptionsGoogleOAuth2) GetPicasaWeb() bool

GetPicasaWeb returns the PicasaWeb field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetProfile

func (c *ConnectionOptionsGoogleOAuth2) GetProfile() bool

GetProfile returns the Profile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetSetUserAttributes

func (c *ConnectionOptionsGoogleOAuth2) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetSites

func (c *ConnectionOptionsGoogleOAuth2) GetSites() bool

GetSites returns the Sites field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetSpreadsheets

func (c *ConnectionOptionsGoogleOAuth2) GetSpreadsheets() bool

GetSpreadsheets returns the Spreadsheets field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetTasks

func (c *ConnectionOptionsGoogleOAuth2) GetTasks() bool

GetTasks returns the Tasks field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetURLShortener

func (c *ConnectionOptionsGoogleOAuth2) GetURLShortener() bool

GetURLShortener returns the URLShortener field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetWebmasterTools

func (c *ConnectionOptionsGoogleOAuth2) GetWebmasterTools() bool

GetWebmasterTools returns the WebmasterTools field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) GetYoutube

func (c *ConnectionOptionsGoogleOAuth2) GetYoutube() bool

GetYoutube returns the Youtube field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsGoogleOAuth2) Scopes

func (c *ConnectionOptionsGoogleOAuth2) Scopes() []string

Scopes returns the scopes for ConnectionOptionsGoogleOAuth2.

func (*ConnectionOptionsGoogleOAuth2) SetScopes

func (c *ConnectionOptionsGoogleOAuth2) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsGoogleOAuth2.

func (*ConnectionOptionsGoogleOAuth2) String

String returns a string representation of ConnectionOptionsGoogleOAuth2.

type ConnectionOptionsLinkedin

type ConnectionOptionsLinkedin struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	StrategyVersion *int `json:"strategy_version,omitempty"`

	Email        *bool `json:"email,omitempty" scope:"email"`
	Profile      *bool `json:"profile,omitempty" scope:"profile"`
	BasicProfile *bool `json:"basic_profile,omitempty" scope:"basic_profile"`

	Scope []interface{} `json:"scope,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsLinkedin is used to configure a Linkedin Connection.

func (*ConnectionOptionsLinkedin) GetBasicProfile

func (c *ConnectionOptionsLinkedin) GetBasicProfile() bool

GetBasicProfile returns the BasicProfile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) GetClientID

func (c *ConnectionOptionsLinkedin) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) GetClientSecret

func (c *ConnectionOptionsLinkedin) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) GetEmail

func (c *ConnectionOptionsLinkedin) GetEmail() bool

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) GetNonPersistentAttrs

func (c *ConnectionOptionsLinkedin) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) GetProfile

func (c *ConnectionOptionsLinkedin) GetProfile() bool

GetProfile returns the Profile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) GetSetUserAttributes

func (c *ConnectionOptionsLinkedin) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) GetStrategyVersion

func (c *ConnectionOptionsLinkedin) GetStrategyVersion() int

GetStrategyVersion returns the StrategyVersion field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsLinkedin) Scopes

func (c *ConnectionOptionsLinkedin) Scopes() []string

Scopes returns the scopes for ConnectionOptionsLinkedin.

func (*ConnectionOptionsLinkedin) SetScopes

func (c *ConnectionOptionsLinkedin) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsLinkedin.

func (*ConnectionOptionsLinkedin) String

func (c *ConnectionOptionsLinkedin) String() string

String returns a string representation of ConnectionOptionsLinkedin.

type ConnectionOptionsOAuth2

type ConnectionOptionsOAuth2 struct {
	ClientID           *string   `json:"client_id,omitempty"`
	ClientSecret       *string   `json:"client_secret,omitempty"`
	AuthorizationURL   *string   `json:"authorizationURL"`
	TokenURL           *string   `json:"tokenURL"`
	Scope              *string   `json:"scope,omitempty"`
	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`
	LogoURL            *string   `json:"icon_url,omitempty"`
	PKCEEnabled        *bool     `json:"pkce_enabled,omitempty"`
	// Scripts for the connection
	// Allowed keys are: "fetchUserProfile"
	Scripts map[string]interface{} `json:"scripts,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsOAuth2 is used to configure an OAuth2 Connection.

func (*ConnectionOptionsOAuth2) GetAuthorizationURL

func (c *ConnectionOptionsOAuth2) GetAuthorizationURL() string

GetAuthorizationURL returns the AuthorizationURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetClientID

func (c *ConnectionOptionsOAuth2) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetClientSecret

func (c *ConnectionOptionsOAuth2) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetLogoURL added in v0.7.0

func (c *ConnectionOptionsOAuth2) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetNonPersistentAttrs

func (c *ConnectionOptionsOAuth2) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetPKCEEnabled added in v0.8.0

func (c *ConnectionOptionsOAuth2) GetPKCEEnabled() bool

GetPKCEEnabled returns the PKCEEnabled field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetScope

func (c *ConnectionOptionsOAuth2) GetScope() string

GetScope returns the Scope field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetSetUserAttributes

func (c *ConnectionOptionsOAuth2) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) GetTokenURL

func (c *ConnectionOptionsOAuth2) GetTokenURL() string

GetTokenURL returns the TokenURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOAuth2) Scopes

func (c *ConnectionOptionsOAuth2) Scopes() []string

Scopes returns the scopes for ConnectionOptionsOAuth2.

func (*ConnectionOptionsOAuth2) SetScopes

func (c *ConnectionOptionsOAuth2) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsOAuth2.

func (*ConnectionOptionsOAuth2) String

func (c *ConnectionOptionsOAuth2) String() string

String returns a string representation of ConnectionOptionsOAuth2.

type ConnectionOptionsOIDC

type ConnectionOptionsOIDC struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	TenantDomain  *string       `json:"tenant_domain,omitempty"`
	DomainAliases []interface{} `json:"domain_aliases,omitempty"`
	LogoURL       *string       `json:"icon_url,omitempty"`

	DiscoveryURL          *string `json:"discovery_url"`
	AuthorizationEndpoint *string `json:"authorization_endpoint"`
	Issuer                *string `json:"issuer"`
	JWKSURI               *string `json:"jwks_uri"`
	Type                  *string `json:"type"`
	UserInfoEndpoint      *string `json:"userinfo_endpoint"`
	TokenEndpoint         *string `json:"token_endpoint"`
	Scope                 *string `json:"scope,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsOIDC is used to configure an OIDC Connection.

func (*ConnectionOptionsOIDC) GetAuthorizationEndpoint

func (c *ConnectionOptionsOIDC) GetAuthorizationEndpoint() string

GetAuthorizationEndpoint returns the AuthorizationEndpoint field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetClientID

func (c *ConnectionOptionsOIDC) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetClientSecret

func (c *ConnectionOptionsOIDC) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetDiscoveryURL

func (c *ConnectionOptionsOIDC) GetDiscoveryURL() string

GetDiscoveryURL returns the DiscoveryURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetIssuer

func (c *ConnectionOptionsOIDC) GetIssuer() string

GetIssuer returns the Issuer field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetJWKSURI

func (c *ConnectionOptionsOIDC) GetJWKSURI() string

GetJWKSURI returns the JWKSURI field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetLogoURL

func (c *ConnectionOptionsOIDC) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetNonPersistentAttrs

func (c *ConnectionOptionsOIDC) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetScope

func (c *ConnectionOptionsOIDC) GetScope() string

GetScope returns the Scope field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetSetUserAttributes

func (c *ConnectionOptionsOIDC) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetTenantDomain

func (c *ConnectionOptionsOIDC) GetTenantDomain() string

GetTenantDomain returns the TenantDomain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetTokenEndpoint

func (c *ConnectionOptionsOIDC) GetTokenEndpoint() string

GetTokenEndpoint returns the TokenEndpoint field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetType

func (c *ConnectionOptionsOIDC) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) GetUserInfoEndpoint

func (c *ConnectionOptionsOIDC) GetUserInfoEndpoint() string

GetUserInfoEndpoint returns the UserInfoEndpoint field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOIDC) Scopes

func (c *ConnectionOptionsOIDC) Scopes() []string

Scopes returns the scopes for ConnectionOptionsOIDC.

func (*ConnectionOptionsOIDC) SetScopes

func (c *ConnectionOptionsOIDC) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsOIDC.

func (*ConnectionOptionsOIDC) String

func (c *ConnectionOptionsOIDC) String() string

String returns a string representation of ConnectionOptionsOIDC.

type ConnectionOptionsOTP

type ConnectionOptionsOTP struct {
	TimeStep *int `json:"time_step,omitempty"`
	Length   *int `json:"length,omitempty"`
}

ConnectionOptionsOTP is used to configure the OTP settings on a ConnectionOptionsEmail.

func (*ConnectionOptionsOTP) GetLength

func (c *ConnectionOptionsOTP) GetLength() int

GetLength returns the Length field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOTP) GetTimeStep

func (c *ConnectionOptionsOTP) GetTimeStep() int

GetTimeStep returns the TimeStep field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsOTP) String

func (c *ConnectionOptionsOTP) String() string

String returns a string representation of ConnectionOptionsOTP.

type ConnectionOptionsSAML

type ConnectionOptionsSAML struct {
	Cert               *string                            `json:"cert,omitempty"`
	Debug              *bool                              `json:"debug,omitempty"`
	Expires            *string                            `json:"expires,omitempty"`
	IdpInitiated       *ConnectionOptionsSAMLIdpInitiated `json:"idpinitiated,omitempty"`
	SigningKey         *ConnectionOptionsSAMLSigningKey   `json:"signing_key,omitempty"`
	SigningCert        *string                            `json:"signingCert,omitempty"`
	Thumbprints        []interface{}                      `json:"thumbprints,omitempty"`
	ProtocolBinding    *string                            `json:"protocolBinding,omitempty"`
	TenantDomain       *string                            `json:"tenant_domain,omitempty"`
	DomainAliases      []interface{}                      `json:"domain_aliases,omitempty"`
	SignInEndpoint     *string                            `json:"signInEndpoint,omitempty"`
	SignOutEndpoint    *string                            `json:"signOutEndpoint,omitempty"`
	DisableSignOut     *bool                              `json:"disableSignout,omitempty"`
	SignatureAlgorithm *string                            `json:"signatureAlgorithm,omitempty"`
	DigestAglorithm    *string                            `json:"digestAlgorithm,omitempty"`
	MetadataXML        *string                            `json:"metadataXml,omitempty"`
	MetadataURL        *string                            `json:"metadataUrl,omitempty"`
	FieldsMap          map[string]interface{}             `json:"fieldsMap,omitempty"`
	Subject            map[string]interface{}             `json:"subject,omitempty"`
	SignSAMLRequest    *bool                              `json:"signSAMLRequest,omitempty"`
	RequestTemplate    *string                            `json:"requestTemplate,omitempty"`
	UserIDAttribute    *string                            `json:"user_id_attribute,omitempty"`
	LogoURL            *string                            `json:"icon_url,omitempty"`
	EntityID           *string                            `json:"entityId,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsSAML is used to configure a SAML Connection.

func (*ConnectionOptionsSAML) GetCert

func (c *ConnectionOptionsSAML) GetCert() string

GetCert returns the Cert field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetDebug

func (c *ConnectionOptionsSAML) GetDebug() bool

GetDebug returns the Debug field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetDigestAglorithm

func (c *ConnectionOptionsSAML) GetDigestAglorithm() string

GetDigestAglorithm returns the DigestAglorithm field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetDisableSignOut added in v0.8.0

func (c *ConnectionOptionsSAML) GetDisableSignOut() bool

GetDisableSignOut returns the DisableSignOut field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetEntityID

func (c *ConnectionOptionsSAML) GetEntityID() string

GetEntityID returns the EntityID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetExpires

func (c *ConnectionOptionsSAML) GetExpires() string

GetExpires returns the Expires field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetIdpInitiated

GetIdpInitiated returns the IdpInitiated field.

func (*ConnectionOptionsSAML) GetLogoURL

func (c *ConnectionOptionsSAML) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetMetadataURL

func (c *ConnectionOptionsSAML) GetMetadataURL() string

GetMetadataURL returns the MetadataURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetMetadataXML

func (c *ConnectionOptionsSAML) GetMetadataXML() string

GetMetadataXML returns the MetadataXML field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetNonPersistentAttrs

func (c *ConnectionOptionsSAML) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetProtocolBinding

func (c *ConnectionOptionsSAML) GetProtocolBinding() string

GetProtocolBinding returns the ProtocolBinding field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetRequestTemplate

func (c *ConnectionOptionsSAML) GetRequestTemplate() string

GetRequestTemplate returns the RequestTemplate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetSetUserAttributes

func (c *ConnectionOptionsSAML) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetSignInEndpoint

func (c *ConnectionOptionsSAML) GetSignInEndpoint() string

GetSignInEndpoint returns the SignInEndpoint field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetSignOutEndpoint

func (c *ConnectionOptionsSAML) GetSignOutEndpoint() string

GetSignOutEndpoint returns the SignOutEndpoint field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetSignSAMLRequest

func (c *ConnectionOptionsSAML) GetSignSAMLRequest() bool

GetSignSAMLRequest returns the SignSAMLRequest field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetSignatureAlgorithm

func (c *ConnectionOptionsSAML) GetSignatureAlgorithm() string

GetSignatureAlgorithm returns the SignatureAlgorithm field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetSigningCert

func (c *ConnectionOptionsSAML) GetSigningCert() string

GetSigningCert returns the SigningCert field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetSigningKey

GetSigningKey returns the SigningKey field.

func (*ConnectionOptionsSAML) GetTenantDomain

func (c *ConnectionOptionsSAML) GetTenantDomain() string

GetTenantDomain returns the TenantDomain field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) GetUserIDAttribute

func (c *ConnectionOptionsSAML) GetUserIDAttribute() string

GetUserIDAttribute returns the UserIDAttribute field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAML) String

func (c *ConnectionOptionsSAML) String() string

String returns a string representation of ConnectionOptionsSAML.

type ConnectionOptionsSAMLIdpInitiated

type ConnectionOptionsSAMLIdpInitiated struct {
	Enabled              *bool   `json:"enabled,omitempty"`
	ClientID             *string `json:"client_id,omitempty"`
	ClientProtocol       *string `json:"client_protocol,omitempty"`
	ClientAuthorizeQuery *string `json:"client_authorizequery,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`
}

ConnectionOptionsSAMLIdpInitiated is used to configure the IdpInitiated settings on a ConnectionOptionsSAML.

func (*ConnectionOptionsSAMLIdpInitiated) GetClientAuthorizeQuery

func (c *ConnectionOptionsSAMLIdpInitiated) GetClientAuthorizeQuery() string

GetClientAuthorizeQuery returns the ClientAuthorizeQuery field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLIdpInitiated) GetClientID

func (c *ConnectionOptionsSAMLIdpInitiated) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLIdpInitiated) GetClientProtocol

func (c *ConnectionOptionsSAMLIdpInitiated) GetClientProtocol() string

GetClientProtocol returns the ClientProtocol field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLIdpInitiated) GetEnabled

func (c *ConnectionOptionsSAMLIdpInitiated) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLIdpInitiated) GetNonPersistentAttrs

func (c *ConnectionOptionsSAMLIdpInitiated) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLIdpInitiated) GetSetUserAttributes

func (c *ConnectionOptionsSAMLIdpInitiated) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLIdpInitiated) String

String returns a string representation of ConnectionOptionsSAMLIdpInitiated.

type ConnectionOptionsSAMLSigningKey

type ConnectionOptionsSAMLSigningKey struct {
	Key  *string `json:"key,omitempty"`
	Cert *string `json:"cert,omitempty"`
}

ConnectionOptionsSAMLSigningKey is used to configure the SigningKey settings on a ConnectionOptionsSAML.

func (*ConnectionOptionsSAMLSigningKey) GetCert

GetCert returns the Cert field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLSigningKey) GetKey

GetKey returns the Key field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSAMLSigningKey) String

String returns a string representation of ConnectionOptionsSAMLSigningKey.

type ConnectionOptionsSMS

type ConnectionOptionsSMS struct {
	Name     *string `json:"name,omitempty"`
	From     *string `json:"from,omitempty"`
	Syntax   *string `json:"syntax,omitempty"`
	Template *string `json:"template,omitempty"`

	OTP *ConnectionOptionsOTP `json:"totp,omitempty"`

	AuthParams interface{} `json:"authParams,omitempty"`

	TwilioSID           *string `json:"twilio_sid,omitempty"`
	TwilioToken         *string `json:"twilio_token,omitempty"`
	MessagingServiceSID *string `json:"messaging_service_sid,omitempty"`

	Provider              *string                          `json:"provider,omitempty"`
	GatewayURL            *string                          `json:"gateway_url,omitempty"`
	GatewayAuthentication *ConnectionGatewayAuthentication `json:"gateway_authentication,omitempty"`
	ForwardRequestInfo    *bool                            `json:"forward_request_info,omitempty"`

	DisableSignup        *bool `json:"disable_signup,omitempty"`
	BruteForceProtection *bool `json:"brute_force_protection,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsSMS is used to configure an SMS Connection.

func (*ConnectionOptionsSMS) GetBruteForceProtection

func (c *ConnectionOptionsSMS) GetBruteForceProtection() bool

GetBruteForceProtection returns the BruteForceProtection field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetDisableSignup

func (c *ConnectionOptionsSMS) GetDisableSignup() bool

GetDisableSignup returns the DisableSignup field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetForwardRequestInfo

func (c *ConnectionOptionsSMS) GetForwardRequestInfo() bool

GetForwardRequestInfo returns the ForwardRequestInfo field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetFrom

func (c *ConnectionOptionsSMS) GetFrom() string

GetFrom returns the From field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetGatewayAuthentication

func (c *ConnectionOptionsSMS) GetGatewayAuthentication() *ConnectionGatewayAuthentication

GetGatewayAuthentication returns the GatewayAuthentication field.

func (*ConnectionOptionsSMS) GetGatewayURL

func (c *ConnectionOptionsSMS) GetGatewayURL() string

GetGatewayURL returns the GatewayURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetMessagingServiceSID

func (c *ConnectionOptionsSMS) GetMessagingServiceSID() string

GetMessagingServiceSID returns the MessagingServiceSID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetName

func (c *ConnectionOptionsSMS) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetOTP

GetOTP returns the OTP field.

func (*ConnectionOptionsSMS) GetProvider

func (c *ConnectionOptionsSMS) GetProvider() string

GetProvider returns the Provider field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetSyntax

func (c *ConnectionOptionsSMS) GetSyntax() string

GetSyntax returns the Syntax field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetTemplate

func (c *ConnectionOptionsSMS) GetTemplate() string

GetTemplate returns the Template field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetTwilioSID

func (c *ConnectionOptionsSMS) GetTwilioSID() string

GetTwilioSID returns the TwilioSID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) GetTwilioToken

func (c *ConnectionOptionsSMS) GetTwilioToken() string

GetTwilioToken returns the TwilioToken field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSMS) String

func (c *ConnectionOptionsSMS) String() string

String returns a string representation of ConnectionOptionsSMS.

type ConnectionOptionsSalesforce

type ConnectionOptionsSalesforce struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	Profile *bool `json:"profile,omitempty" scope:"profile"`

	Scope []interface{} `json:"scope,omitempty"`

	CommunityBaseURL   *string   `json:"community_base_url,omitempty"`
	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsSalesforce is used to configure a SalesForce Connection.

func (*ConnectionOptionsSalesforce) GetClientID

func (c *ConnectionOptionsSalesforce) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSalesforce) GetClientSecret

func (c *ConnectionOptionsSalesforce) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSalesforce) GetCommunityBaseURL

func (c *ConnectionOptionsSalesforce) GetCommunityBaseURL() string

GetCommunityBaseURL returns the CommunityBaseURL field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSalesforce) GetNonPersistentAttrs

func (c *ConnectionOptionsSalesforce) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSalesforce) GetProfile

func (c *ConnectionOptionsSalesforce) GetProfile() bool

GetProfile returns the Profile field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSalesforce) GetSetUserAttributes

func (c *ConnectionOptionsSalesforce) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsSalesforce) Scopes

func (c *ConnectionOptionsSalesforce) Scopes() []string

Scopes returns the scopes for ConnectionOptionsSalesforce.

func (*ConnectionOptionsSalesforce) SetScopes

func (c *ConnectionOptionsSalesforce) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsSalesforce.

func (*ConnectionOptionsSalesforce) String

func (c *ConnectionOptionsSalesforce) String() string

String returns a string representation of ConnectionOptionsSalesforce.

type ConnectionOptionsWindowsLive

type ConnectionOptionsWindowsLive struct {
	ClientID     *string `json:"client_id,omitempty"`
	ClientSecret *string `json:"client_secret,omitempty"`

	StrategyVersion *int `json:"strategy_version,omitempty"`

	OfflineAccess   *bool `json:"offline_access,omitempty" scope:"offline_access"`
	UserUpdate      *bool `json:"graph_user_update,omitempty" scope:"graph_user_update"`
	UserActivity    *bool `json:"graph_user_activity,omitempty" scope:"graph_user_activity"`
	Device          *bool `json:"graph_device,omitempty" scope:"graph_device"`
	Emails          *bool `json:"graph_emails,omitempty" scope:"graph_emails"`
	NotesUpdate     *bool `json:"graph_notes_update,omitempty" scope:"graph_notes_update"`
	User            *bool `json:"graph_user,omitempty" scope:"graph_user"`
	DeviceCommand   *bool `json:"graph_device_command,omitempty" scope:"graph_device_command"`
	EmailsUpdate    *bool `json:"graph_emails_update,omitempty" scope:"graph_emails_update"`
	Calendars       *bool `json:"graph_calendars,omitempty" scope:"graph_calendars"`
	CalendarsUpdate *bool `json:"graph_calendars_update,omitempty" scope:"graph_calendars_update"`
	Contacts        *bool `json:"graph_contacts,omitempty" scope:"graph_contacts"`
	ContactsUpdate  *bool `json:"graph_contacts_update,omitempty" scope:"graph_contacts_update"`
	Files           *bool `json:"graph_files,omitempty" scope:"graph_files"`
	FilesAll        *bool `json:"graph_files_all,omitempty" scope:"graph_files_all"`
	FilesUpdate     *bool `json:"graph_files_update,omitempty" scope:"graph_files_update"`
	FilesAllUpdate  *bool `json:"graph_files_all_update,omitempty" scope:"graph_files_all_update"`
	Notes           *bool `json:"graph_notes,omitempty" scope:"graph_notes"`
	NotesCreate     *bool `json:"graph_notes_create,omitempty" scope:"graph_notes_create"`
	Tasks           *bool `json:"graph_tasks,omitempty" scope:"graph_tasks"`
	TasksUpdate     *bool `json:"graph_tasks_update,omitempty" scope:"graph_tasks_update"`
	Signin          *bool `json:"signin,omitempty" scope:"signin"`

	Scope []interface{} `json:"scope,omitempty"`

	SetUserAttributes  *string   `json:"set_user_root_attributes,omitempty"`
	NonPersistentAttrs *[]string `json:"non_persistent_attrs,omitempty"`

	UpstreamParams map[string]interface{} `json:"upstream_params,omitempty"`
}

ConnectionOptionsWindowsLive is used to configure a WindowsLive Connection.

func (*ConnectionOptionsWindowsLive) GetCalendars

func (c *ConnectionOptionsWindowsLive) GetCalendars() bool

GetCalendars returns the Calendars field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetCalendarsUpdate

func (c *ConnectionOptionsWindowsLive) GetCalendarsUpdate() bool

GetCalendarsUpdate returns the CalendarsUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetClientID

func (c *ConnectionOptionsWindowsLive) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetClientSecret

func (c *ConnectionOptionsWindowsLive) GetClientSecret() string

GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetContacts

func (c *ConnectionOptionsWindowsLive) GetContacts() bool

GetContacts returns the Contacts field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetContactsUpdate

func (c *ConnectionOptionsWindowsLive) GetContactsUpdate() bool

GetContactsUpdate returns the ContactsUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetDevice

func (c *ConnectionOptionsWindowsLive) GetDevice() bool

GetDevice returns the Device field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetDeviceCommand

func (c *ConnectionOptionsWindowsLive) GetDeviceCommand() bool

GetDeviceCommand returns the DeviceCommand field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetEmails

func (c *ConnectionOptionsWindowsLive) GetEmails() bool

GetEmails returns the Emails field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetEmailsUpdate

func (c *ConnectionOptionsWindowsLive) GetEmailsUpdate() bool

GetEmailsUpdate returns the EmailsUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetFiles

func (c *ConnectionOptionsWindowsLive) GetFiles() bool

GetFiles returns the Files field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetFilesAll

func (c *ConnectionOptionsWindowsLive) GetFilesAll() bool

GetFilesAll returns the FilesAll field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetFilesAllUpdate

func (c *ConnectionOptionsWindowsLive) GetFilesAllUpdate() bool

GetFilesAllUpdate returns the FilesAllUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetFilesUpdate

func (c *ConnectionOptionsWindowsLive) GetFilesUpdate() bool

GetFilesUpdate returns the FilesUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetNonPersistentAttrs

func (c *ConnectionOptionsWindowsLive) GetNonPersistentAttrs() []string

GetNonPersistentAttrs returns the NonPersistentAttrs field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetNotes

func (c *ConnectionOptionsWindowsLive) GetNotes() bool

GetNotes returns the Notes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetNotesCreate

func (c *ConnectionOptionsWindowsLive) GetNotesCreate() bool

GetNotesCreate returns the NotesCreate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetNotesUpdate

func (c *ConnectionOptionsWindowsLive) GetNotesUpdate() bool

GetNotesUpdate returns the NotesUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetOfflineAccess

func (c *ConnectionOptionsWindowsLive) GetOfflineAccess() bool

GetOfflineAccess returns the OfflineAccess field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetSetUserAttributes

func (c *ConnectionOptionsWindowsLive) GetSetUserAttributes() string

GetSetUserAttributes returns the SetUserAttributes field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetSignin

func (c *ConnectionOptionsWindowsLive) GetSignin() bool

GetSignin returns the Signin field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetStrategyVersion

func (c *ConnectionOptionsWindowsLive) GetStrategyVersion() int

GetStrategyVersion returns the StrategyVersion field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetTasks

func (c *ConnectionOptionsWindowsLive) GetTasks() bool

GetTasks returns the Tasks field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetTasksUpdate

func (c *ConnectionOptionsWindowsLive) GetTasksUpdate() bool

GetTasksUpdate returns the TasksUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetUser

func (c *ConnectionOptionsWindowsLive) GetUser() bool

GetUser returns the User field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetUserActivity

func (c *ConnectionOptionsWindowsLive) GetUserActivity() bool

GetUserActivity returns the UserActivity field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) GetUserUpdate

func (c *ConnectionOptionsWindowsLive) GetUserUpdate() bool

GetUserUpdate returns the UserUpdate field if it's non-nil, zero value otherwise.

func (*ConnectionOptionsWindowsLive) Scopes

func (c *ConnectionOptionsWindowsLive) Scopes() []string

Scopes returns the scopes for ConnectionOptionsWindowsLive.

func (*ConnectionOptionsWindowsLive) SetScopes

func (c *ConnectionOptionsWindowsLive) SetScopes(enable bool, scopes ...string)

SetScopes sets the scopes for ConnectionOptionsWindowsLive.

func (*ConnectionOptionsWindowsLive) String

String returns a string representation of ConnectionOptionsWindowsLive.

type CreateEnrollmentTicket

type CreateEnrollmentTicket struct {
	// UserID is the user_id for the enrollment ticket.
	UserID string `json:"user_id,omitempty"`
	// Email is an alternate email address to which the enrollment email will
	// be sent. If empty, the email will be sent to the user's default email
	// address.
	Email string `json:"email,omitempty"`
	// SendMail indicates whether to send an email to the user to start the
	// multi-factor authentication enrollment process.
	SendMail bool `json:"send_mail,omitempty"`
}

CreateEnrollmentTicket used to create an enrollment ticket.

func (*CreateEnrollmentTicket) String

func (c *CreateEnrollmentTicket) String() string

String returns a string representation of CreateEnrollmentTicket.

type CustomDomain

type CustomDomain struct {
	// The id of the custom domain.
	ID *string `json:"custom_domain_id,omitempty"`

	// The custom domain.
	Domain *string `json:"domain,omitempty"`

	// The custom domain provisioning type.
	// Can be either "auth0_managed_certs" or "self_managed_certs".
	Type *string `json:"type,omitempty"`

	// Primary is true if the domain was marked as "primary", false otherwise.
	Primary *bool `json:"primary,omitempty"`

	// The custom domain configuration status. Can be any of the following:
	//
	// "disabled", "pending", "pending_verification" or "ready"
	Status *string `json:"status,omitempty"`

	// The origin domain name that the CNAME or reverse proxy should be pointed
	// to.
	OriginDomainName *string `json:"origin_domain_name,omitempty"`

	// For self-managed certificates, when the verification completes for the
	// first time, this field will be set to the value the reverse proxy should
	// send in the cname-api-key header field.
	CNAMEAPIKey *string `json:"cname_api_key,omitempty"`

	// The custom domain verification method. The only allowed value is "txt".
	VerificationMethod *string `json:"verification_method,omitempty"`

	Verification *CustomDomainVerification `json:"verification,omitempty"`

	// The TLS version policy. Can be either "compatible" or "recommended".
	TLSPolicy *string `json:"tls_policy,omitempty"`

	// The HTTP header to fetch the client's IP address.
	CustomClientIPHeader *string `json:"custom_client_ip_header,omitempty"`
}

CustomDomain to be used on authentication pages.

See: https://auth0.com/docs/customize/custom-domains

func (*CustomDomain) GetCNAMEAPIKey added in v0.6.2

func (c *CustomDomain) GetCNAMEAPIKey() string

GetCNAMEAPIKey returns the CNAMEAPIKey field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetCustomClientIPHeader

func (c *CustomDomain) GetCustomClientIPHeader() string

GetCustomClientIPHeader returns the CustomClientIPHeader field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetDomain

func (c *CustomDomain) GetDomain() string

GetDomain returns the Domain field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetID

func (c *CustomDomain) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetOriginDomainName added in v0.6.2

func (c *CustomDomain) GetOriginDomainName() string

GetOriginDomainName returns the OriginDomainName field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetPrimary

func (c *CustomDomain) GetPrimary() bool

GetPrimary returns the Primary field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetStatus

func (c *CustomDomain) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetTLSPolicy

func (c *CustomDomain) GetTLSPolicy() string

GetTLSPolicy returns the TLSPolicy field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetType

func (c *CustomDomain) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*CustomDomain) GetVerification

func (c *CustomDomain) GetVerification() *CustomDomainVerification

GetVerification returns the Verification field.

func (*CustomDomain) GetVerificationMethod

func (c *CustomDomain) GetVerificationMethod() string

GetVerificationMethod returns the VerificationMethod field if it's non-nil, zero value otherwise.

func (*CustomDomain) String

func (c *CustomDomain) String() string

String returns a string representation of CustomDomain.

type CustomDomainManager

type CustomDomainManager struct {
	*Management
}

CustomDomainManager manages Auth0 CustomDomain resources.

func (*CustomDomainManager) Create

func (m *CustomDomainManager) Create(c *CustomDomain, opts ...RequestOption) (err error)

Create a new custom domain.

Note: The custom domain will need to be verified before it starts accepting requests.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/post_custom_domains

func (*CustomDomainManager) Delete

func (m *CustomDomainManager) Delete(id string, opts ...RequestOption) (err error)

Delete a custom domain and stop serving requests for it.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/delete_custom_domains_by_id

func (*CustomDomainManager) List

func (m *CustomDomainManager) List(opts ...RequestOption) (c []*CustomDomain, err error)

List all custom domains.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/get_custom_domains

func (*CustomDomainManager) Read

func (m *CustomDomainManager) Read(id string, opts ...RequestOption) (c *CustomDomain, err error)

Read a custom domain configuration and status.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/get_custom_domains_by_id

func (*CustomDomainManager) Update

func (m *CustomDomainManager) Update(id string, c *CustomDomain, opts ...RequestOption) (err error)

Update a custom domain.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/patch_custom_domains_by_id

func (*CustomDomainManager) Verify

func (m *CustomDomainManager) Verify(id string, opts ...RequestOption) (c *CustomDomain, err error)

Verify a custom domain.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/post_verify

type CustomDomainVerification

type CustomDomainVerification struct {
	// The custom domain verification methods.
	Methods []map[string]interface{} `json:"methods,omitempty"`
}

CustomDomainVerification is used to verify a CustomDomain.

func (*CustomDomainVerification) String

func (c *CustomDomainVerification) String() string

String returns a string representation of CustomDomainVerification.

type DailyStat

type DailyStat struct {
	Date            *time.Time `json:"date"`
	Logins          *int       `json:"logins"`
	Signups         *int       `json:"signups"`
	LeakedPasswords *int       `json:"leaked_passwords"`
	UpdatedAt       *time.Time `json:"updated_at"`
	CreatedAt       *time.Time `json:"created_at"`
}

DailyStat for an Auth0 Tenant.

func (*DailyStat) GetCreatedAt

func (d *DailyStat) GetCreatedAt() time.Time

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*DailyStat) GetDate

func (d *DailyStat) GetDate() time.Time

GetDate returns the Date field if it's non-nil, zero value otherwise.

func (*DailyStat) GetLeakedPasswords

func (d *DailyStat) GetLeakedPasswords() int

GetLeakedPasswords returns the LeakedPasswords field if it's non-nil, zero value otherwise.

func (*DailyStat) GetLogins

func (d *DailyStat) GetLogins() int

GetLogins returns the Logins field if it's non-nil, zero value otherwise.

func (*DailyStat) GetSignups

func (d *DailyStat) GetSignups() int

GetSignups returns the Signups field if it's non-nil, zero value otherwise.

func (*DailyStat) GetUpdatedAt

func (d *DailyStat) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.

func (*DailyStat) String

func (d *DailyStat) String() string

String returns a string representation of DailyStat.

type Email

type Email struct {
	// The name of the email provider. Can be one of "mandrill", "sendgrid",
	// "sparkpost", "ses" or "smtp".
	Name *string `json:"name,omitempty"`

	// True if the email provider is enabled, false otherwise (defaults to true)
	Enabled *bool `json:"enabled,omitempty"`

	// The default FROM address.
	DefaultFromAddress *string `json:"default_from_address,omitempty"`

	Credentials *EmailCredentials      `json:"credentials,omitempty"`
	Settings    map[string]interface{} `json:"settings,omitempty"`
}

Email is used to configure Email Providers.

See: https://auth0.com/docs/customize/email

func (*Email) GetCredentials

func (e *Email) GetCredentials() *EmailCredentials

GetCredentials returns the Credentials field.

func (*Email) GetDefaultFromAddress

func (e *Email) GetDefaultFromAddress() string

GetDefaultFromAddress returns the DefaultFromAddress field if it's non-nil, zero value otherwise.

func (*Email) GetEnabled

func (e *Email) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*Email) GetName

func (e *Email) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Email) String

func (e *Email) String() string

String returns a string representation of Email.

type EmailCredentials

type EmailCredentials struct {
	// API User
	APIUser *string `json:"api_user,omitempty"`
	// API Key
	APIKey *string `json:"api_key,omitempty"`
	// AWS Access Key ID
	AccessKeyID *string `json:"accessKeyId,omitempty"`
	// AWS Secret Access Key
	SecretAccessKey *string `json:"secretAccessKey,omitempty"`
	// AWS default region
	Region *string `json:"region,omitempty"`
	// SMTP host
	SMTPHost *string `json:"smtp_host,omitempty"`
	// SMTP port
	SMTPPort *int `json:"smtp_port,omitempty"`
	// SMTP user
	SMTPUser *string `json:"smtp_user,omitempty"`
	// SMTP password
	SMTPPass *string `json:"smtp_pass,omitempty"`
	// Domain
	Domain *string `json:"domain,omitempty"`
}

EmailCredentials are used for authenticating Email Providers.

func (*EmailCredentials) GetAPIKey

func (e *EmailCredentials) GetAPIKey() string

GetAPIKey returns the APIKey field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetAPIUser

func (e *EmailCredentials) GetAPIUser() string

GetAPIUser returns the APIUser field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetAccessKeyID

func (e *EmailCredentials) GetAccessKeyID() string

GetAccessKeyID returns the AccessKeyID field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetDomain

func (e *EmailCredentials) GetDomain() string

GetDomain returns the Domain field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetRegion

func (e *EmailCredentials) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetSMTPHost

func (e *EmailCredentials) GetSMTPHost() string

GetSMTPHost returns the SMTPHost field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetSMTPPass

func (e *EmailCredentials) GetSMTPPass() string

GetSMTPPass returns the SMTPPass field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetSMTPPort

func (e *EmailCredentials) GetSMTPPort() int

GetSMTPPort returns the SMTPPort field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetSMTPUser

func (e *EmailCredentials) GetSMTPUser() string

GetSMTPUser returns the SMTPUser field if it's non-nil, zero value otherwise.

func (*EmailCredentials) GetSecretAccessKey

func (e *EmailCredentials) GetSecretAccessKey() string

GetSecretAccessKey returns the SecretAccessKey field if it's non-nil, zero value otherwise.

func (*EmailCredentials) String

func (e *EmailCredentials) String() string

String returns a string representation of EmailCredentials.

type EmailManager

type EmailManager struct {
	*Management
}

EmailManager manages Auth0 Email resources.

func (*EmailManager) Create

func (m *EmailManager) Create(e *Email, opts ...RequestOption) error

Create an email provider.

The credentials object requires different properties depending on the email provider (which is specified using the name property):

- `mandrill` requires `api_key` - `sendgrid` requires `api_key` - `sparkpost` requires `api_key`. Optionally, set `region` to `eu` to use the SparkPost service hosted in Western Europe; set to `null` to use the SparkPost service hosted in North America. `eu` or `null` are the only valid values for `region`. - ses requires accessKeyId, secretAccessKey, and region - smtp requires smtp_host, smtp_port, smtp_user, and smtp_pass - `mailgun` requires `api_key` and `domain`. Optionally, set region to eu to use the Mailgun service hosted in Europe; set to null otherwise. "eu" or null are the only valid values for region.

Depending on the type of provider it is possible to specify settings object with different configuration options, which will be used when sending an email:

- `smtp` provider, `settings` may contain `headers` object. When using AWS SES SMTP host, you may provide a name of configuration set in an `X-SES-Configuration-Set` header. The value must be a string.

See: https://auth0.com/docs/api/management/v2#!/Emails/post_provider

func (*EmailManager) Delete

func (m *EmailManager) Delete(opts ...RequestOption) (err error)

Delete the email provider.

See: https://auth0.com/docs/api/management/v2#!/Emails/delete_provider

func (*EmailManager) Read

func (m *EmailManager) Read(opts ...RequestOption) (e *Email, err error)

Read email provider details.

See: https://auth0.com/docs/api/management/v2#!/Emails/get_provider

func (*EmailManager) Update

func (m *EmailManager) Update(e *Email, opts ...RequestOption) (err error)

Update an email provider.

See: https://auth0.com/docs/api/management/v2#!/Emails/patch_provider

type EmailTemplate

type EmailTemplate struct {
	// The template name. Can be one of "verify_email", "reset_email",
	// "welcome_email", "blocked_account", "stolen_credentials",
	// "enrollment_email", "change_password", "password_reset" or
	// "mfa_oob_code".
	Template *string `json:"template,omitempty"`

	// The body of the template.
	Body *string `json:"body,omitempty"`

	// The sender of the email.
	From *string `json:"from,omitempty"`

	// The URL to redirect the user to after a successful action.
	ResultURL *string `json:"resultUrl,omitempty"`

	// The subject of the email.
	Subject *string `json:"subject,omitempty"`

	// The syntax of the template body.
	Syntax *string `json:"syntax,omitempty"`

	// The lifetime in seconds that the link within the email will be valid for.
	URLLifetimeInSecoonds *int `json:"urlLifetimeInSeconds,omitempty"`

	// Whether or not the template is enabled.
	Enabled *bool `json:"enabled,omitempty"`

	// Whether the `reset_email` and `verify_email` templates should include the user's
	// email address as the email parameter in the returnUrl (true) or whether no email
	// address should be included in the redirect (false). Defaults to true.
	IncludeEmailInRedirect *bool `json:"includeEmailInRedirect,omitempty"`
}

EmailTemplate is used to customize emails.

See https://auth0.com/docs/customize/email/email-templates

func (*EmailTemplate) GetBody

func (e *EmailTemplate) GetBody() string

GetBody returns the Body field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetEnabled

func (e *EmailTemplate) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetFrom

func (e *EmailTemplate) GetFrom() string

GetFrom returns the From field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetIncludeEmailInRedirect added in v0.9.0

func (e *EmailTemplate) GetIncludeEmailInRedirect() bool

GetIncludeEmailInRedirect returns the IncludeEmailInRedirect field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetResultURL

func (e *EmailTemplate) GetResultURL() string

GetResultURL returns the ResultURL field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetSubject

func (e *EmailTemplate) GetSubject() string

GetSubject returns the Subject field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetSyntax

func (e *EmailTemplate) GetSyntax() string

GetSyntax returns the Syntax field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetTemplate

func (e *EmailTemplate) GetTemplate() string

GetTemplate returns the Template field if it's non-nil, zero value otherwise.

func (*EmailTemplate) GetURLLifetimeInSecoonds

func (e *EmailTemplate) GetURLLifetimeInSecoonds() int

GetURLLifetimeInSecoonds returns the URLLifetimeInSecoonds field if it's non-nil, zero value otherwise.

func (*EmailTemplate) String

func (e *EmailTemplate) String() string

String returns a string representation of EmailTemplate.

type EmailTemplateManager

type EmailTemplateManager struct {
	*Management
}

EmailTemplateManager manages Auth0 EmailTemplate resources.

func (*EmailTemplateManager) Create

func (m *EmailTemplateManager) Create(e *EmailTemplate, opts ...RequestOption) error

Create an email template.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/post_email_templates

func (*EmailTemplateManager) Read

func (m *EmailTemplateManager) Read(template string, opts ...RequestOption) (e *EmailTemplate, err error)

Read an email template by pre-defined name.

These names are `verify_email`, `reset_email`, `welcome_email`, `blocked_account`, `stolen_credentials`, `enrollment_email`, and `mfa_oob_code`.

The names `change_password`, and `password_reset` are also supported for legacy scenarios.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/get_email_templates_by_templateName

func (*EmailTemplateManager) Replace

func (m *EmailTemplateManager) Replace(template string, e *EmailTemplate, opts ...RequestOption) (err error)

Replace an email template.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/put_email_templates_by_templateName

func (*EmailTemplateManager) Update

func (m *EmailTemplateManager) Update(template string, e *EmailTemplate, opts ...RequestOption) (err error)

Update an email template.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/patch_email_templates_by_templateName

type Enrollment

type Enrollment struct {
	// ID for this enrollment
	ID *string `json:"id,omitempty"`
	// Status of this enrollment. Can be 'pending' or 'confirmed'
	Status *string `json:"status,omitempty"`
	// Device name (only for push notification).
	Name *string `json:"name,omitempty"`
	// Device identifier. This is usually the phone identifier.
	Identifier *string `json:"identifier,omitempty"`
	// Phone number.
	PhoneNumber *string `json:"phone_number,omitempty"`
	// Enrollment date and time.
	EnrolledAt *time.Time `json:"enrolled_at,omitempty"`
	// Last authentication date and time.
	LastAuth *time.Time `json:"last_auth,omitempty"`
}

Enrollment is used for MultiFactor Authentication.

func (*Enrollment) GetEnrolledAt

func (e *Enrollment) GetEnrolledAt() time.Time

GetEnrolledAt returns the EnrolledAt field if it's non-nil, zero value otherwise.

func (*Enrollment) GetID

func (e *Enrollment) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Enrollment) GetIdentifier

func (e *Enrollment) GetIdentifier() string

GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.

func (*Enrollment) GetLastAuth

func (e *Enrollment) GetLastAuth() time.Time

GetLastAuth returns the LastAuth field if it's non-nil, zero value otherwise.

func (*Enrollment) GetName

func (e *Enrollment) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Enrollment) GetPhoneNumber

func (e *Enrollment) GetPhoneNumber() string

GetPhoneNumber returns the PhoneNumber field if it's non-nil, zero value otherwise.

func (*Enrollment) GetStatus

func (e *Enrollment) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*Enrollment) String

func (e *Enrollment) String() string

String returns a string representation of Enrollment.

type EnrollmentManager

type EnrollmentManager struct {
	*Management
}

EnrollmentManager manages Auth0 MultiFactor enrollment resources.

func (*EnrollmentManager) CreateTicket

CreateTicket creates a multi-factor authentication enrollment ticket for a specified user.

See: https://auth0.com/docs/api/management/v2#!/Guardian/post_ticket

func (*EnrollmentManager) Delete

func (m *EnrollmentManager) Delete(id string, opts ...RequestOption) (err error)

Delete an enrollment to allow the user to enroll with multi-factor authentication again.

See: https://auth0.com/docs/api/management/v2#!/Guardian/delete_enrollments_by_id

func (*EnrollmentManager) Get

func (m *EnrollmentManager) Get(id string, opts ...RequestOption) (en *Enrollment, err error)

Get retrieves an enrollment (including its status and type).

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_enrollments_by_id

type EnrollmentTicket

type EnrollmentTicket struct {
	TicketID  string `json:"ticket_id"`
	TicketURL string `json:"ticket_url"`
}

EnrollmentTicket holds information on the ticket ID and URL.

func (*EnrollmentTicket) String

func (e *EnrollmentTicket) String() string

String returns a string representation of EnrollmentTicket.

type Error

type Error interface {
	// Status returns the status code returned by the server together with the
	// present error.
	Status() int
	error
}

Error is an interface describing any error which could be returned by the Auth0 Management API.

type Grant

type Grant struct {
	// The id of the grant.
	ID *string `json:"id,omitempty"`

	// The id of the client.
	ClientID *string `json:"clientID,omitempty"`

	// The id of the user.
	UserID *string `json:"user_id"`

	// The grant's audience.
	Audience *string `json:"audience,omitempty"`

	Scope []interface{} `json:"scope,omitempty"`
}

Grant is a way of retrieving an Access Token.

See: https://auth0.com/docs/get-started/authentication-and-authorization-flow/which-oauth-2-0-flow-should-i-use

func (*Grant) GetAudience

func (g *Grant) GetAudience() string

GetAudience returns the Audience field if it's non-nil, zero value otherwise.

func (*Grant) GetClientID

func (g *Grant) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*Grant) GetID

func (g *Grant) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Grant) GetUserID

func (g *Grant) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*Grant) String

func (g *Grant) String() string

String returns a string representation of Grant.

type GrantList

type GrantList struct {
	List
	Grants []*Grant `json:"grants"`
}

GrantList is a list of Grants.

func (*GrantList) String

func (g *GrantList) String() string

String returns a string representation of GrantList.

type GrantManager

type GrantManager struct {
	*Management
}

GrantManager manages Auth0 Grant resources.

func (*GrantManager) Delete

func (m *GrantManager) Delete(id string, opts ...RequestOption) error

Delete revokes a grant associated with a user-id.

https://auth0.com/docs/api/management/v2#!/Grants/delete_grants_by_id

func (*GrantManager) List

func (m *GrantManager) List(opts ...RequestOption) (g *GrantList, err error)

List the grants associated with your account.

See: https://auth0.com/docs/api/management/v2#!/Grants/get_grants

type GuardianManager

type GuardianManager struct {
	Enrollment  *EnrollmentManager
	MultiFactor *MultiFactorManager
}

GuardianManager manages Auth0 Guardian resources.

type Hook

type Hook struct {
	// The hook's identifier.
	ID *string `json:"id,omitempty"`

	// The name of the hook. Can only contain alphanumeric characters, spaces
	// and '-'. Can neither start nor end with '-' or spaces.
	Name *string `json:"name,omitempty"`

	// A script that contains the hook's code.
	Script *string `json:"script,omitempty"`

	// The extensibility point name
	// Can currently be any of the following:
	// "credentials-exchange", "pre-user-registration",
	// "post-user-registration", "post-change-password"
	TriggerID *string `json:"triggerId,omitempty"`

	// Used to store additional metadata
	Dependencies *map[string]interface{} `json:"dependencies,omitempty"`

	// Enabled should be set to true if the hook is enabled, false otherwise.
	Enabled *bool `json:"enabled,omitempty"`
}

Hook is a secure, self-contained function that allows the behavior of Auth0 to be customized.

See: https://auth0.com/docs/customize/hooks

func (*Hook) GetEnabled

func (h *Hook) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*Hook) GetID

func (h *Hook) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Hook) GetName

func (h *Hook) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Hook) GetScript

func (h *Hook) GetScript() string

GetScript returns the Script field if it's non-nil, zero value otherwise.

func (*Hook) GetTriggerID

func (h *Hook) GetTriggerID() string

GetTriggerID returns the TriggerID field if it's non-nil, zero value otherwise.

func (*Hook) String

func (h *Hook) String() string

String returns a string representation of Hook.

type HookList

type HookList struct {
	List
	Hooks []*Hook `json:"hooks"`
}

HookList is a list of Hooks.

func (*HookList) String

func (h *HookList) String() string

String returns a string representation of HookList.

type HookManager

type HookManager struct {
	*Management
}

HookManager manages Auth0 Hook resources.

func (*HookManager) Create

func (m *HookManager) Create(h *Hook, opts ...RequestOption) error

Create a new hook.

Note: Changing a hook's trigger changes the signature of the script and should be done with caution.

See: https://auth0.com/docs/api/management/v2#!/Hooks/post_hooks

func (*HookManager) CreateSecrets

func (m *HookManager) CreateSecrets(hookID string, s HookSecrets, opts ...RequestOption) (err error)

CreateSecrets adds one or more secrets to an existing hook. A hook can have a maximum of 20 secrets.

See: https://auth0.com/docs/api/management/v2#!/Hooks/post_secrets

func (*HookManager) Delete

func (m *HookManager) Delete(id string, opts ...RequestOption) error

Delete a hook.

See: https://auth0.com/docs/api/management/v2/#!/Hooks/delete_hooks_by_id

func (*HookManager) List

func (m *HookManager) List(opts ...RequestOption) (l *HookList, err error)

List all hooks.

See: https://auth0.com/docs/api/management/v2/#!/Hooks/get_hooks

func (*HookManager) Read

func (m *HookManager) Read(id string, opts ...RequestOption) (h *Hook, err error)

Read hook details. Accepts a list of fields to include or exclude in the result.

See: https://auth0.com/docs/api/management/v2/#!/Hooks/get_hooks_by_id

func (*HookManager) RemoveAllSecrets

func (m *HookManager) RemoveAllSecrets(hookID string, opts ...RequestOption) (err error)

RemoveAllSecrets removes all secrets associated with a given hook.

func (*HookManager) RemoveSecrets

func (m *HookManager) RemoveSecrets(hookID string, keys []string, opts ...RequestOption) (err error)

RemoveSecrets deletes one or more existing secrets for a given hook. Accepts an array of secret names to delete.

See: https://auth0.com/docs/api/management/v2/#!/Hooks/delete_secrets

func (*HookManager) ReplaceSecrets

func (m *HookManager) ReplaceSecrets(hookID string, s HookSecrets, opts ...RequestOption) (err error)

ReplaceSecrets replaces existing secrets with the provided ones.

Note: ReplaceSecrets is a wrapper method and will internally call Secrets, CreateSecrets, UpdateSecrets or RemoveSecrets as needed in order to replicate PUT semantics.

func (*HookManager) Secrets

func (m *HookManager) Secrets(hookID string, opts ...RequestOption) (s HookSecrets, err error)

Secrets retrieves a hook's secrets by the ID of the hook.

Note: For security, hook secret values cannot be retrieved outside rule execution (they all appear as "_VALUE_NOT_SHOWN_").

See: https://auth0.com/docs/api/management/v2/#!/Hooks/get_secrets

func (*HookManager) Update

func (m *HookManager) Update(id string, h *Hook, opts ...RequestOption) error

Update an existing hook.

See: https://auth0.com/docs/api/management/v2/#!/Hooks/patch_hooks_by_id

func (*HookManager) UpdateSecrets

func (m *HookManager) UpdateSecrets(hookID string, s HookSecrets, opts ...RequestOption) (err error)

UpdateSecrets updates one or more existing secrets for an existing hook.

See: https://auth0.com/docs/api/management/v2#!/Hooks/patch_secrets

type HookSecrets

type HookSecrets map[string]string

HookSecrets are the secret keys and values associated with a Hook.

func (HookSecrets) Keys

func (s HookSecrets) Keys() []string

Keys gets the configured hook secret keys.

type Job

type Job struct {
	// The job's identifier. Useful to retrieve its status
	ID *string `json:"id,omitempty"`
	// The job's status
	Status *string `json:"status,omitempty"`
	// The type of job
	Type *string `json:"type,omitempty"`
	// The date when the job was created.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// The user_id of the user to whom the email will be sent
	UserID *string `json:"user_id,omitempty"`
	// The id of the client, if not provided the global one will be used
	ClientID *string `json:"client_id,omitempty"`

	// The id of the connection.
	ConnectionID *string `json:"connection_id,omitempty"`
	// The url to download the result of the job.
	Location *string `json:"location,omitempty"`
	// The percentage of the work done so far.
	PercentageDone *int `json:"percentage_done,omitempty"`
	// Estimated amount of time remaining to finish the job.
	TimeLeftSeconds *int `json:"time_left_seconds,omitempty"`
	// The format of the file. Valid values are: "json" and "csv".
	Format *string `json:"format,omitempty"`
	// Limit the number of records.
	Limit *int `json:"limit,omitempty"`
	// A list of fields to be included in the CSV. If omitted, a set of
	// predefined fields will be exported.
	Fields []map[string]interface{} `json:"fields,omitempty"`

	// A list of users. Used when importing users in bulk.
	Users []map[string]interface{} `json:"users,omitempty"`
	// If false, users will only be inserted. If there are already user(s) with
	// the same emails as one or more of those being inserted, they will fail.
	// If this value is set to true and the user being imported already exists,
	// the user will be updated with the new information.
	Upsert *bool `json:"upsert,omitempty"`
	// Optional user defined string that can be used for correlating multiple
	// jobs, and is returned as part of the job status response.
	ExternalID *string `json:"external_id,omitempty"`
	// When true, sends a completion email to all tenant owners when the job is
	// finished. The default is true, so you must explicitly set this parameter
	// to false if you do not want emails sent.
	SendCompletionEmail *bool `json:"send_completion_email,omitempty"`
}

Job is used for importing/exporting users or for sending email address verification emails.

See: https://auth0.com/docs/manage-users/user-migration/bulk-user-imports

func (*Job) GetClientID

func (j *Job) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*Job) GetConnectionID

func (j *Job) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*Job) GetCreatedAt

func (j *Job) GetCreatedAt() time.Time

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*Job) GetExternalID

func (j *Job) GetExternalID() string

GetExternalID returns the ExternalID field if it's non-nil, zero value otherwise.

func (*Job) GetFormat

func (j *Job) GetFormat() string

GetFormat returns the Format field if it's non-nil, zero value otherwise.

func (*Job) GetID

func (j *Job) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Job) GetLimit

func (j *Job) GetLimit() int

GetLimit returns the Limit field if it's non-nil, zero value otherwise.

func (*Job) GetLocation

func (j *Job) GetLocation() string

GetLocation returns the Location field if it's non-nil, zero value otherwise.

func (*Job) GetPercentageDone

func (j *Job) GetPercentageDone() int

GetPercentageDone returns the PercentageDone field if it's non-nil, zero value otherwise.

func (*Job) GetSendCompletionEmail

func (j *Job) GetSendCompletionEmail() bool

GetSendCompletionEmail returns the SendCompletionEmail field if it's non-nil, zero value otherwise.

func (*Job) GetStatus

func (j *Job) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*Job) GetTimeLeftSeconds

func (j *Job) GetTimeLeftSeconds() int

GetTimeLeftSeconds returns the TimeLeftSeconds field if it's non-nil, zero value otherwise.

func (*Job) GetType

func (j *Job) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*Job) GetUpsert

func (j *Job) GetUpsert() bool

GetUpsert returns the Upsert field if it's non-nil, zero value otherwise.

func (*Job) GetUserID

func (j *Job) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*Job) String

func (j *Job) String() string

String returns a string representation of Job.

type JobManager

type JobManager struct {
	*Management
}

JobManager manages Auth0 Job resources.

func (*JobManager) ExportUsers

func (m *JobManager) ExportUsers(j *Job, opts ...RequestOption) error

ExportUsers exports all users to a file via a long-running job.

See: https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports

func (*JobManager) ImportUsers

func (m *JobManager) ImportUsers(j *Job, opts ...RequestOption) error

ImportUsers imports users from a formatted file into a connection via a long-running job.

See: https://auth0.com/docs/api/management/v2#!/Jobs/post_users_imports

func (*JobManager) Read

func (m *JobManager) Read(id string, opts ...RequestOption) (j *Job, err error)

Read retrieves a job. Useful to check its status.

See: https://auth0.com/docs/api/management/v2#!/Jobs/get_jobs_by_id

func (*JobManager) VerifyEmail

func (m *JobManager) VerifyEmail(j *Job, opts ...RequestOption) error

VerifyEmail sends an email to the specified user that asks them to click a link to verify their email address.

type List

type List struct {
	Start  int    `json:"start"`
	Limit  int    `json:"limit"`
	Length int    `json:"length"`
	Total  int    `json:"total"`
	Next   string `json:"next"`
}

List is an envelope which is typically used when calling List() or Search() methods.

It holds metadata such as the total result count, starting offset and limit.

Specific implementations embed this struct, therefore its direct use is not useful. Rather it has been made public in order to aid documentation.

func (List) HasNext

func (l List) HasNext() bool

HasNext returns true if the list has more results.

func (*List) String

func (l *List) String() string

String returns a string representation of List.

type Log

type Log struct {
	ID    *string `json:"_id"`
	LogID *string `json:"log_id"`

	// The date when the event was created
	Date *time.Time `json:"date"`

	// The log event type
	Type *string `json:"type"`

	// The log event description
	Description *string `json:"description"`

	// The id of the client
	ClientID *string `json:"client_id"`

	// The name of the client
	ClientName *string `json:"client_name"`

	// The IP of the log event source
	IP *string `json:"ip"`

	LocationInfo map[string]interface{} `json:"location_info"`
	Details      map[string]interface{} `json:"details"`

	// The user's unique identifier
	UserID *string `json:"user_id"`
}

Log for analyzing business needs.

See: https://auth0.com/docs/deploy-monitor/logs

func (*Log) GetClientID

func (l *Log) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*Log) GetClientName

func (l *Log) GetClientName() string

GetClientName returns the ClientName field if it's non-nil, zero value otherwise.

func (*Log) GetDate

func (l *Log) GetDate() time.Time

GetDate returns the Date field if it's non-nil, zero value otherwise.

func (*Log) GetDescription

func (l *Log) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*Log) GetID

func (l *Log) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Log) GetIP

func (l *Log) GetIP() string

GetIP returns the IP field if it's non-nil, zero value otherwise.

func (*Log) GetLogID

func (l *Log) GetLogID() string

GetLogID returns the LogID field if it's non-nil, zero value otherwise.

func (*Log) GetType

func (l *Log) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*Log) GetUserID

func (l *Log) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*Log) String

func (l *Log) String() string

String returns a string representation of Log.

func (*Log) TypeName

func (l *Log) TypeName() string

TypeName returns the type name of an Event Log.

type LogManager

type LogManager struct {
	*Management
}

LogManager manages Auth0 Log resources.

func (*LogManager) List

func (m *LogManager) List(opts ...RequestOption) (l []*Log, err error)

List all log entries that match the specified search criteria (or lists all log entries if no criteria are used). Set custom search criteria using the `q` parameter, or search from a specific log id ("search from checkpoint").

For more information on all possible event types, their respective acronyms and descriptions, Log Data Event Listing.

See: https://auth0.com/docs/api/management/v2#!/Logs/get_logs

func (*LogManager) Read

func (m *LogManager) Read(id string, opts ...RequestOption) (l *Log, err error)

Read the data related to the log entry identified by id. This returns a single log entry representation as specified in the schema.

See: https://auth0.com/docs/api/management/v2#!/Logs/get_logs_by_id

func (*LogManager) Search

func (m *LogManager) Search(opts ...RequestOption) ([]*Log, error)

Search is an alias for List.

type LogStream

type LogStream struct {
	// The hook's identifier.
	ID *string `json:"id,omitempty"`

	// The name of the hook. Can only contain alphanumeric characters, spaces
	// and '-'. Can neither start nor end with '-' or spaces.
	Name *string `json:"name,omitempty"`

	// The type of the log-stream. Can be one of "http", "eventbridge",
	// "eventgrid", "datadog" or "splunk".
	Type *string `json:"type,omitempty"`

	// The status of the log-stream. Can be one of "active", "paused", or "suspended".
	Status *string `json:"status,omitempty"`

	// Only logs events matching these filters will be delivered by the stream.
	// If omitted or empty, all events will be delivered.
	Filters []interface{} `json:"filters,omitempty"`

	// Sink for validation.
	Sink interface{} `json:"-"`
}

LogStream is used to export tenant log events to a log event analysis service.

See: https://auth0.com/docs/customize/log-streams

func (*LogStream) GetID

func (l *LogStream) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*LogStream) GetName

func (l *LogStream) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*LogStream) GetStatus

func (l *LogStream) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*LogStream) GetType

func (l *LogStream) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*LogStream) MarshalJSON

func (ls *LogStream) MarshalJSON() ([]byte, error)

MarshalJSON is a custom serializer for the LogStream type.

func (*LogStream) String

func (l *LogStream) String() string

String returns a string representation of LogStream.

func (*LogStream) UnmarshalJSON

func (ls *LogStream) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom deserializer for the LogStream type.

type LogStreamManager

type LogStreamManager struct {
	*Management
}

LogStreamManager manages Auth0 LogStream resources.

func (*LogStreamManager) Create

func (m *LogStreamManager) Create(l *LogStream, opts ...RequestOption) error

Create a log stream.

See: https://auth0.com/docs/api/management/v2#!/log-streams

func (*LogStreamManager) Delete

func (m *LogStreamManager) Delete(id string, opts ...RequestOption) (err error)

Delete a log stream.

See: https://auth0.com/docs/api/management/v2#!/log-streams

func (*LogStreamManager) List

func (m *LogStreamManager) List(opts ...RequestOption) (ls []*LogStream, err error)

List all log streams.

See: https://auth0.com/docs/api/management/v2#!/log-streams/get_log_streams

func (*LogStreamManager) Read

func (m *LogStreamManager) Read(id string, opts ...RequestOption) (l *LogStream, err error)

Read a log stream.

See: https://auth0.com/docs/api/management/v2#!/Log_Streams/get_log_streams_by_id

func (*LogStreamManager) Update

func (m *LogStreamManager) Update(id string, l *LogStream, opts ...RequestOption) (err error)

Update a log stream.

The following fields may be updated in a PATCH operation: Name, Status, Sink.

Note: For log streams of type eventbridge and eventgrid, updating the sink is not permitted.

See: https://auth0.com/docs/api/management/v2#!/log-streams

type LogStreamSinkAmazonEventBridge

type LogStreamSinkAmazonEventBridge struct {
	// AWS Account Id
	AccountID *string `json:"awsAccountId,omitempty"`
	// AWS Region
	Region *string `json:"awsRegion,omitempty"`
	// AWS Partner Event Source
	PartnerEventSource *string `json:"awsPartnerEventSource,omitempty"`
}

LogStreamSinkAmazonEventBridge is used to export logs to Amazon EventBridge.

func (*LogStreamSinkAmazonEventBridge) GetAccountID

func (l *LogStreamSinkAmazonEventBridge) GetAccountID() string

GetAccountID returns the AccountID field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAmazonEventBridge) GetPartnerEventSource

func (l *LogStreamSinkAmazonEventBridge) GetPartnerEventSource() string

GetPartnerEventSource returns the PartnerEventSource field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAmazonEventBridge) GetRegion

func (l *LogStreamSinkAmazonEventBridge) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAmazonEventBridge) String

String returns a string representation of LogStreamSinkAmazonEventBridge.

type LogStreamSinkAzureEventGrid

type LogStreamSinkAzureEventGrid struct {
	// Azure Subscription Id
	SubscriptionID *string `json:"azureSubscriptionId,omitempty"`
	// Azure Resource Group
	ResourceGroup *string `json:"azureResourceGroup,omitempty"`
	// Azure Region
	Region *string `json:"azureRegion,omitempty"`
	// Azure Partner Topic
	PartnerTopic *string `json:"azurePartnerTopic,omitempty"`
}

LogStreamSinkAzureEventGrid is used to export logs to Azure Event Grid.

func (*LogStreamSinkAzureEventGrid) GetPartnerTopic

func (l *LogStreamSinkAzureEventGrid) GetPartnerTopic() string

GetPartnerTopic returns the PartnerTopic field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) GetRegion

func (l *LogStreamSinkAzureEventGrid) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) GetResourceGroup

func (l *LogStreamSinkAzureEventGrid) GetResourceGroup() string

GetResourceGroup returns the ResourceGroup field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) GetSubscriptionID

func (l *LogStreamSinkAzureEventGrid) GetSubscriptionID() string

GetSubscriptionID returns the SubscriptionID field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) String

func (l *LogStreamSinkAzureEventGrid) String() string

String returns a string representation of LogStreamSinkAzureEventGrid.

type LogStreamSinkDatadog

type LogStreamSinkDatadog struct {
	// Datadog Region
	Region *string `json:"datadogRegion,omitempty"`
	// Datadog Api Key
	APIKey *string `json:"datadogApiKey,omitempty"`
}

LogStreamSinkDatadog is used to export logs to Datadog.

func (*LogStreamSinkDatadog) GetAPIKey

func (l *LogStreamSinkDatadog) GetAPIKey() string

GetAPIKey returns the APIKey field if it's non-nil, zero value otherwise.

func (*LogStreamSinkDatadog) GetRegion

func (l *LogStreamSinkDatadog) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*LogStreamSinkDatadog) String

func (l *LogStreamSinkDatadog) String() string

String returns a string representation of LogStreamSinkDatadog.

type LogStreamSinkHTTP

type LogStreamSinkHTTP struct {
	// HTTP ContentFormat
	ContentFormat *string `json:"httpContentFormat,omitempty"`
	// HTTP ContentType
	ContentType *string `json:"httpContentType,omitempty"`
	// HTTP Endpoint
	Endpoint *string `json:"httpEndpoint,omitempty"`
	// HTTP Authorization
	Authorization *string `json:"httpAuthorization,omitempty"`
	// Custom HTTP headers
	CustomHeaders []interface{} `json:"httpCustomHeaders,omitempty"`
}

LogStreamSinkHTTP is used to export logs to Custom Webhooks.

func (*LogStreamSinkHTTP) GetAuthorization

func (l *LogStreamSinkHTTP) GetAuthorization() string

GetAuthorization returns the Authorization field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) GetContentFormat

func (l *LogStreamSinkHTTP) GetContentFormat() string

GetContentFormat returns the ContentFormat field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) GetContentType

func (l *LogStreamSinkHTTP) GetContentType() string

GetContentType returns the ContentType field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) GetEndpoint

func (l *LogStreamSinkHTTP) GetEndpoint() string

GetEndpoint returns the Endpoint field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) String

func (l *LogStreamSinkHTTP) String() string

String returns a string representation of LogStreamSinkHTTP.

type LogStreamSinkSplunk

type LogStreamSinkSplunk struct {
	// Splunk Domain
	Domain *string `json:"splunkDomain,omitempty"`
	// Splunk Token
	Token *string `json:"splunkToken,omitempty"`
	// Splunk Port
	Port *string `json:"splunkPort,omitempty"`
	// Splunk Secure
	Secure *bool `json:"splunkSecure,omitempty"`
}

LogStreamSinkSplunk is used to export logs to Splunk.

func (*LogStreamSinkSplunk) GetDomain

func (l *LogStreamSinkSplunk) GetDomain() string

GetDomain returns the Domain field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSplunk) GetPort

func (l *LogStreamSinkSplunk) GetPort() string

GetPort returns the Port field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSplunk) GetSecure

func (l *LogStreamSinkSplunk) GetSecure() bool

GetSecure returns the Secure field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSplunk) GetToken

func (l *LogStreamSinkSplunk) GetToken() string

GetToken returns the Token field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSplunk) String

func (l *LogStreamSinkSplunk) String() string

String returns a string representation of LogStreamSinkSplunk.

type LogStreamSinkSumo

type LogStreamSinkSumo struct {
	// Sumo Source Address
	SourceAddress *string `json:"sumoSourceAddress,omitempty"`
}

LogStreamSinkSumo is used to export logs to Sumo Logic.

func (*LogStreamSinkSumo) GetSourceAddress

func (l *LogStreamSinkSumo) GetSourceAddress() string

GetSourceAddress returns the SourceAddress field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSumo) String

func (l *LogStreamSinkSumo) String() string

String returns a string representation of LogStreamSinkSumo.

type Management

type Management struct {
	// Client manages Auth0 Client (also known as Application) resources.
	Client *ClientManager

	// ClientGrant manages Auth0 ClientGrant resources.
	ClientGrant *ClientGrantManager

	// ResourceServer manages Auth0 Resource Server (also known as API)
	// resources.
	ResourceServer *ResourceServerManager

	// Connection manages Auth0 Connection resources.
	Connection *ConnectionManager

	// CustomDomain manages Auth0 Custom Domains.
	CustomDomain *CustomDomainManager

	// Grant manages Auth0 Grants.
	Grant *GrantManager

	// Log reads Auth0 Logs.
	Log *LogManager

	// LogStream reads Auth0 Logs.
	LogStream *LogStreamManager

	// RoleManager manages Auth0 Roles.
	Role *RoleManager

	// RuleManager manages Auth0 Rules.
	Rule *RuleManager

	// HookManager manages Auth0 Hooks
	Hook *HookManager

	// RuleManager manages Auth0 Rule Configurations.
	RuleConfig *RuleConfigManager

	// Email manages Auth0 Email Providers.
	Email *EmailManager

	// EmailTemplate manages Auth0 Email Templates.
	EmailTemplate *EmailTemplateManager

	// User manages Auth0 User resources.
	User *UserManager

	// Job manages Auth0 jobs.
	Job *JobManager

	// Tenant manages your Auth0 Tenant.
	Tenant *TenantManager

	// Ticket creates verify email or change password tickets.
	Ticket *TicketManager

	// Stat is used to retrieve usage statistics.
	Stat *StatManager

	// Branding settings such as company logo or primary color.
	Branding *BrandingManager

	// Guardian manages your Auth0 Guardian settings
	Guardian *GuardianManager

	// Prompt manages your prompt settings.
	Prompt *PromptManager

	// Blacklist manages the auth0 blacklists
	Blacklist *BlacklistManager

	// SigningKey manages Auth0 Application Signing Keys.
	SigningKey *SigningKeyManager

	// Anomaly manages the IP blocks
	Anomaly *AnomalyManager

	// Actions manages Actions extensibility
	Action *ActionManager

	// Organization manages Auth0 Organizations.
	Organization *OrganizationManager

	// AttackProtection manages Auth0 Attack Protection.
	AttackProtection *AttackProtectionManager
	// contains filtered or unexported fields
}

Management is an Auth0 management client used to interact with the Auth0 Management API v2.

func New

func New(domain string, options ...Option) (*Management, error)

New creates a new Auth0 Management client by authenticating using the supplied client id and secret.

Example
package main

import (
	"os"

	"github.com/auth0/go-auth0/management"
)

var (
	domain = os.Getenv("AUTH0_DOMAIN")
	id     = os.Getenv("AUTH0_CLIENT_ID")
	secret = os.Getenv("AUTH0_CLIENT_SECRET")

	api *management.Management
)

func init() {
	var err error
	api, err = management.New(domain, management.WithClientCredentials(id, secret))
	if err != nil {
		panic(err)
	}
}

func main() {
	api, err := management.New(domain, management.WithClientCredentials(id, secret))
	if err != nil {
		// handle err
		return
	}
	_, _ = api.Stat.ActiveUsers()
}
Output:

func (*Management) Do

func (m *Management) Do(req *http.Request) (*http.Response, error)

Do sends an HTTP request and returns an HTTP response, handling any context cancellations or timeouts.

func (*Management) NewRequest

func (m *Management) NewRequest(method, uri string, payload interface{}, options ...RequestOption) (r *http.Request, err error)

NewRequest returns a new HTTP request. If the payload is not nil it will be encoded as JSON.

func (*Management) Request

func (m *Management) Request(method, uri string, v interface{}, options ...RequestOption) error

Request combines NewRequest and Do, while also handling decoding of response payload.

func (*Management) URI

func (m *Management) URI(path ...string) string

URI returns the absolute URL of the Management API with any path segments appended to the end.

type MultiFactor

type MultiFactor struct {
	// States if this factor is enabled
	Enabled *bool `json:"enabled,omitempty"`

	// Guardian Factor name
	Name *string `json:"name,omitempty"`

	// For factors with trial limits (e.g. SMS) states if those limits have been exceeded
	TrialExpired *bool `json:"trial_expired,omitempty"`
}

MultiFactor Authentication method.

func (*MultiFactor) GetEnabled

func (m *MultiFactor) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*MultiFactor) GetName

func (m *MultiFactor) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*MultiFactor) GetTrialExpired

func (m *MultiFactor) GetTrialExpired() bool

GetTrialExpired returns the TrialExpired field if it's non-nil, zero value otherwise.

func (*MultiFactor) String

func (m *MultiFactor) String() string

String returns a string representation of MultiFactor.

type MultiFactorDUO

type MultiFactorDUO struct{ *Management }

MultiFactorDUO is used for Duo MFA.

func (*MultiFactorDUO) Enable

func (m *MultiFactorDUO) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables DUO Security Multi-factor Authentication.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

func (*MultiFactorDUO) Read added in v0.8.0

func (m *MultiFactorDUO) Read(opts ...RequestOption) (s *MultiFactorDUOSettings, err error)

Read WebAuthn Roaming Multi-factor Authentication Settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/configure-cisco-duo-for-mfa

func (*MultiFactorDUO) String

func (m *MultiFactorDUO) String() string

String returns a string representation of MultiFactorDUO.

func (*MultiFactorDUO) Update added in v0.8.0

Update WebAuthn Roaming Multi-factor Authentication Settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/configure-cisco-duo-for-mfa

type MultiFactorDUOSettings added in v0.8.0

type MultiFactorDUOSettings struct {
	Hostname       *string `json:"host,omitempty"`
	IntegrationKey *string `json:"ikey,omitempty"`
	SecretKey      *string `json:"skey,omitempty"`
}

MultiFactorDUOSettings holds settings for configuring DUO.

func (*MultiFactorDUOSettings) GetHostname added in v0.8.0

func (m *MultiFactorDUOSettings) GetHostname() string

GetHostname returns the Hostname field if it's non-nil, zero value otherwise.

func (*MultiFactorDUOSettings) GetIntegrationKey added in v0.8.0

func (m *MultiFactorDUOSettings) GetIntegrationKey() string

GetIntegrationKey returns the IntegrationKey field if it's non-nil, zero value otherwise.

func (*MultiFactorDUOSettings) GetSecretKey added in v0.8.0

func (m *MultiFactorDUOSettings) GetSecretKey() string

GetSecretKey returns the SecretKey field if it's non-nil, zero value otherwise.

func (*MultiFactorDUOSettings) String added in v0.8.0

func (m *MultiFactorDUOSettings) String() string

String returns a string representation of MultiFactorDUOSettings.

type MultiFactorEmail

type MultiFactorEmail struct{ *Management }

MultiFactorEmail is used for Email MFA.

func (*MultiFactorEmail) Enable

func (m *MultiFactorEmail) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables the Email Multi-factor Authentication.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

func (*MultiFactorEmail) String

func (m *MultiFactorEmail) String() string

String returns a string representation of MultiFactorEmail.

type MultiFactorManager

type MultiFactorManager struct {
	*Management
	Phone            *MultiFactorPhone
	SMS              *MultiFactorSMS
	Push             *MultiFactorPush
	Email            *MultiFactorEmail
	DUO              *MultiFactorDUO
	OTP              *MultiFactorOTP
	RecoveryCode     *MultiFactorRecoveryCode
	WebAuthnRoaming  *MultiFactorWebAuthnRoaming
	WebAuthnPlatform *MultiFactorWebAuthnPlatform
}

MultiFactorManager manages MultiFactor Authentication options.

func (*MultiFactorManager) List

func (m *MultiFactorManager) List(opts ...RequestOption) (mf []*MultiFactor, err error)

List retrieves all factors.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_factors

func (*MultiFactorManager) Policy

func (m *MultiFactorManager) Policy(opts ...RequestOption) (p *MultiFactorPolicies, err error)

Policy retrieves MFA policies.

See: https://auth0.com/docs/api/management/v2/#!/Guardian/get_policies

func (*MultiFactorManager) UpdatePolicy

func (m *MultiFactorManager) UpdatePolicy(p *MultiFactorPolicies, opts ...RequestOption) error

UpdatePolicy updates MFA policies.

See: https://auth0.com/docs/api/management/v2/#!/Guardian/put_policies Expects an array of either ["all-applications"] or ["confidence-score"].

type MultiFactorOTP

type MultiFactorOTP struct{ *Management }

MultiFactorOTP is used for OTP MFA.

func (*MultiFactorOTP) Enable

func (m *MultiFactorOTP) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables One-time Password Multi-factor Authentication.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

func (*MultiFactorOTP) String

func (m *MultiFactorOTP) String() string

String returns a string representation of MultiFactorOTP.

type MultiFactorPhone

type MultiFactorPhone struct{ *Management }

MultiFactorPhone is used to manage Phone MFA.

func (*MultiFactorPhone) Enable

func (m *MultiFactorPhone) Enable(enabled bool, opts ...RequestOption) error

Enable Phone MFA. See: https://auth0.com/docs/api/management/v2/#!/Guardian/put_factors_by_name

func (*MultiFactorPhone) MessageTypes

func (m *MultiFactorPhone) MessageTypes(opts ...RequestOption) (mt *PhoneMessageTypes, err error)

MessageTypes retrieves the MFA Phone Message Type. See: https://auth0.com/docs/api/management/v2/#!/Guardian/get_message_types

func (*MultiFactorPhone) Provider

func (m *MultiFactorPhone) Provider(opts ...RequestOption) (p *MultiFactorProvider, err error)

Provider retrieves the MFA Phone provider, one of ["auth0" or "twilio" or "phone-message-hook"] See: https://auth0.com/docs/api/management/v2/#!/Guardian/get_selected_provider

func (*MultiFactorPhone) String

func (m *MultiFactorPhone) String() string

String returns a string representation of MultiFactorPhone.

func (*MultiFactorPhone) UpdateMessageTypes

func (m *MultiFactorPhone) UpdateMessageTypes(mt *PhoneMessageTypes, opts ...RequestOption) error

UpdateMessageTypes updates MFA Phone Message Type. See: https://auth0.com/docs/api/management/v2/#!/Guardian/put_message_types

func (*MultiFactorPhone) UpdateProvider

func (m *MultiFactorPhone) UpdateProvider(p *MultiFactorProvider, opts ...RequestOption) error

UpdateProvider updates MFA Phone provider, one of ["auth0" or "twilio" or "phone-message-hook"] See: https://auth0.com/docs/api/management/v2/#!/Guardian/put_selected_provider

type MultiFactorPolicies

type MultiFactorPolicies []string

MultiFactorPolicies policies for MultiFactor authentication.

type MultiFactorProvider

type MultiFactorProvider struct {
	// One of auth0|twilio|phone-message-hook
	Provider *string `json:"provider,omitempty"`
}

MultiFactorProvider holds provider type for MultiFactor Authentication.

func (*MultiFactorProvider) GetProvider

func (m *MultiFactorProvider) GetProvider() string

GetProvider returns the Provider field if it's non-nil, zero value otherwise.

func (*MultiFactorProvider) String

func (m *MultiFactorProvider) String() string

String returns a string representation of MultiFactorProvider.

type MultiFactorProviderAmazonSNS

type MultiFactorProviderAmazonSNS struct {
	// AWS Access Key ID
	AccessKeyID *string `json:"aws_access_key_id,omitempty"`

	// AWS Secret Access Key ID
	SecretAccessKeyID *string `json:"aws_secret_access_key,omitempty"`

	// AWS Region
	Region *string `json:"aws_region,omitempty"`

	// SNS APNS Platform Application ARN
	APNSPlatformApplicationARN *string `json:"sns_apns_platform_application_arn,omitempty"`

	// SNS GCM Platform Application ARN
	GCMPlatformApplicationARN *string `json:"sns_gcm_platform_application_arn,omitempty"`
}

MultiFactorProviderAmazonSNS is an AmazonSNS provider used for MultiFactorPush Authentication.

func (*MultiFactorProviderAmazonSNS) GetAPNSPlatformApplicationARN

func (m *MultiFactorProviderAmazonSNS) GetAPNSPlatformApplicationARN() string

GetAPNSPlatformApplicationARN returns the APNSPlatformApplicationARN field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderAmazonSNS) GetAccessKeyID

func (m *MultiFactorProviderAmazonSNS) GetAccessKeyID() string

GetAccessKeyID returns the AccessKeyID field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderAmazonSNS) GetGCMPlatformApplicationARN

func (m *MultiFactorProviderAmazonSNS) GetGCMPlatformApplicationARN() string

GetGCMPlatformApplicationARN returns the GCMPlatformApplicationARN field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderAmazonSNS) GetRegion

func (m *MultiFactorProviderAmazonSNS) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderAmazonSNS) GetSecretAccessKeyID

func (m *MultiFactorProviderAmazonSNS) GetSecretAccessKeyID() string

GetSecretAccessKeyID returns the SecretAccessKeyID field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderAmazonSNS) String

String returns a string representation of MultiFactorProviderAmazonSNS.

type MultiFactorProviderTwilio

type MultiFactorProviderTwilio struct {
	// From number
	From *string `json:"from,omitempty"`

	// Copilot SID
	MessagingServiceSid *string `json:"messaging_service_sid,omitempty"`

	// Twilio Authentication token
	AuthToken *string `json:"auth_token,omitempty"`

	// Twilio SID
	SID *string `json:"sid,omitempty"`
}

MultiFactorProviderTwilio is used for Twilio MultiFactor Authentication.

func (*MultiFactorProviderTwilio) GetAuthToken

func (m *MultiFactorProviderTwilio) GetAuthToken() string

GetAuthToken returns the AuthToken field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderTwilio) GetFrom

func (m *MultiFactorProviderTwilio) GetFrom() string

GetFrom returns the From field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderTwilio) GetMessagingServiceSid

func (m *MultiFactorProviderTwilio) GetMessagingServiceSid() string

GetMessagingServiceSid returns the MessagingServiceSid field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderTwilio) GetSID

func (m *MultiFactorProviderTwilio) GetSID() string

GetSID returns the SID field if it's non-nil, zero value otherwise.

func (*MultiFactorProviderTwilio) String

func (m *MultiFactorProviderTwilio) String() string

String returns a string representation of MultiFactorProviderTwilio.

type MultiFactorPush

type MultiFactorPush struct{ *Management }

MultiFactorPush is used for Push MFA.

func (*MultiFactorPush) AmazonSNS

func (m *MultiFactorPush) AmazonSNS(opts ...RequestOption) (s *MultiFactorProviderAmazonSNS, err error)

AmazonSNS returns the Amazon Web Services (AWS) Simple Notification Service (SNS) provider configuration.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_sns

func (*MultiFactorPush) CustomApp added in v0.8.0

func (m *MultiFactorPush) CustomApp(opts ...RequestOption) (a *MultiFactorPushCustomApp, err error)

CustomApp retrieves the custom multi-factor authentication app's settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa

func (*MultiFactorPush) Enable

func (m *MultiFactorPush) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables the Push Notification (via Auth0 Guardian) Multi-factor Authentication.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

func (*MultiFactorPush) String

func (m *MultiFactorPush) String() string

String returns a string representation of MultiFactorPush.

func (*MultiFactorPush) UpdateAmazonSNS

func (m *MultiFactorPush) UpdateAmazonSNS(sc *MultiFactorProviderAmazonSNS, opts ...RequestOption) error

UpdateAmazonSNS updates the Amazon Web Services (AWS) Simple Notification Service (SNS) provider configuration.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_sns

func (*MultiFactorPush) UpdateCustomApp added in v0.8.0

func (m *MultiFactorPush) UpdateCustomApp(a *MultiFactorPushCustomApp, opts ...RequestOption) error

UpdateCustomApp updates the custom multi-factor authentication app's settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-push-notifications-for-mfa

type MultiFactorPushCustomApp added in v0.8.0

type MultiFactorPushCustomApp struct {
	AppName       *string `json:"app_name,omitempty"`
	AppleAppLink  *string `json:"apple_app_link,omitempty"`
	GoogleAppLink *string `json:"google_app_link,omitempty"`
}

MultiFactorPushCustomApp holds custom multi-factor authentication app settings.

func (*MultiFactorPushCustomApp) GetAppName added in v0.8.0

func (m *MultiFactorPushCustomApp) GetAppName() string

GetAppName returns the AppName field if it's non-nil, zero value otherwise.

func (m *MultiFactorPushCustomApp) GetAppleAppLink() string

GetAppleAppLink returns the AppleAppLink field if it's non-nil, zero value otherwise.

func (m *MultiFactorPushCustomApp) GetGoogleAppLink() string

GetGoogleAppLink returns the GoogleAppLink field if it's non-nil, zero value otherwise.

func (*MultiFactorPushCustomApp) String added in v0.8.0

func (m *MultiFactorPushCustomApp) String() string

String returns a string representation of MultiFactorPushCustomApp.

type MultiFactorRecoveryCode added in v0.8.0

type MultiFactorRecoveryCode struct {
	*Management
}

MultiFactorRecoveryCode is used for RecoveryCode MFA.

func (*MultiFactorRecoveryCode) Enable added in v0.8.0

func (m *MultiFactorRecoveryCode) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables Recovery Code Multi-factor Authentication.

See: https://auth0.com/docs/secure/multi-factor-authentication/configure-recovery-codes-for-mfa

func (*MultiFactorRecoveryCode) String added in v0.8.0

func (m *MultiFactorRecoveryCode) String() string

String returns a string representation of MultiFactorRecoveryCode.

type MultiFactorSMS

type MultiFactorSMS struct{ *Management }

MultiFactorSMS is used for SMS MFA.

func (*MultiFactorSMS) Enable

func (m *MultiFactorSMS) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables the SMS Multi-factor Authentication.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

func (*MultiFactorSMS) String

func (m *MultiFactorSMS) String() string

String returns a string representation of MultiFactorSMS.

func (*MultiFactorSMS) Template

func (m *MultiFactorSMS) Template(opts ...RequestOption) (t *MultiFactorSMSTemplate, err error)

Template retrieves enrollment and verification templates. You can use this to check the current values for your templates.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_templates

func (*MultiFactorSMS) Twilio

func (m *MultiFactorSMS) Twilio(opts ...RequestOption) (t *MultiFactorProviderTwilio, err error)

Twilio returns the Twilio provider configuration.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_twilio

func (*MultiFactorSMS) UpdateTemplate

func (m *MultiFactorSMS) UpdateTemplate(t *MultiFactorSMSTemplate, opts ...RequestOption) error

UpdateTemplate updates the enrollment and verification templates. It's useful to send custom messages on SMS enrollment and verification.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_templates

func (*MultiFactorSMS) UpdateTwilio

func (m *MultiFactorSMS) UpdateTwilio(t *MultiFactorProviderTwilio, opts ...RequestOption) error

UpdateTwilio updates the Twilio provider configuration.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_twilio

type MultiFactorSMSTemplate

type MultiFactorSMSTemplate struct {
	// Message sent to the user when they are invited to enroll with a phone number
	EnrollmentMessage *string `json:"enrollment_message,omitempty"`

	// Message sent to the user when they are prompted to verify their account
	VerificationMessage *string `json:"verification_message,omitempty"`
}

MultiFactorSMSTemplate holds the sms template for MultiFactor Authentication.

func (*MultiFactorSMSTemplate) GetEnrollmentMessage

func (m *MultiFactorSMSTemplate) GetEnrollmentMessage() string

GetEnrollmentMessage returns the EnrollmentMessage field if it's non-nil, zero value otherwise.

func (*MultiFactorSMSTemplate) GetVerificationMessage

func (m *MultiFactorSMSTemplate) GetVerificationMessage() string

GetVerificationMessage returns the VerificationMessage field if it's non-nil, zero value otherwise.

func (*MultiFactorSMSTemplate) String

func (m *MultiFactorSMSTemplate) String() string

String returns a string representation of MultiFactorSMSTemplate.

type MultiFactorWebAuthnPlatform

type MultiFactorWebAuthnPlatform struct{ *Management }

MultiFactorWebAuthnPlatform is used for WebAuthnPlatform MFA.

func (*MultiFactorWebAuthnPlatform) Enable

func (m *MultiFactorWebAuthnPlatform) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables WebAuthn Platform Multi-factor Authentication.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

func (*MultiFactorWebAuthnPlatform) Read added in v0.8.0

Read WebAuthn Platform Multi-factor Authentication Settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa

func (*MultiFactorWebAuthnPlatform) String

func (m *MultiFactorWebAuthnPlatform) String() string

String returns a string representation of MultiFactorWebAuthnPlatform.

func (*MultiFactorWebAuthnPlatform) Update added in v0.8.0

Update WebAuthn Platform Multi-factor Authentication Settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-device-biometrics-for-mfa

type MultiFactorWebAuthnRoaming

type MultiFactorWebAuthnRoaming struct{ *Management }

MultiFactorWebAuthnRoaming is used for WebAuthnRoaming MFA.

func (*MultiFactorWebAuthnRoaming) Enable

func (m *MultiFactorWebAuthnRoaming) Enable(enabled bool, opts ...RequestOption) error

Enable enables or disables WebAuthn Roaming Multi-factor Authentication.

See: https://auth0.com/docs/api/management/v2#!/Guardian/put_factors_by_name

func (*MultiFactorWebAuthnRoaming) Read added in v0.8.0

Read WebAuthn Roaming Multi-factor Authentication Settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-security-keys-for-mfa

func (*MultiFactorWebAuthnRoaming) String

func (m *MultiFactorWebAuthnRoaming) String() string

String returns a string representation of MultiFactorWebAuthnRoaming.

func (*MultiFactorWebAuthnRoaming) Update added in v0.8.0

Update WebAuthn Roaming Multi-factor Authentication Settings.

See: https://auth0.com/docs/secure/multi-factor-authentication/fido-authentication-with-webauthn/configure-webauthn-security-keys-for-mfa

type MultiFactorWebAuthnSettings added in v0.8.0

type MultiFactorWebAuthnSettings struct {
	OverrideRelyingParty   *bool   `json:"overrideRelyingParty,omitempty"`
	RelyingPartyIdentifier *string `json:"relyingPartyIdentifier,omitempty"`
	UserVerification       *string `json:"userVerification,omitempty"`
}

MultiFactorWebAuthnSettings holds settings for configuring WebAuthn Roaming or Platform.

func (*MultiFactorWebAuthnSettings) GetOverrideRelyingParty added in v0.8.0

func (m *MultiFactorWebAuthnSettings) GetOverrideRelyingParty() bool

GetOverrideRelyingParty returns the OverrideRelyingParty field if it's non-nil, zero value otherwise.

func (*MultiFactorWebAuthnSettings) GetRelyingPartyIdentifier added in v0.8.0

func (m *MultiFactorWebAuthnSettings) GetRelyingPartyIdentifier() string

GetRelyingPartyIdentifier returns the RelyingPartyIdentifier field if it's non-nil, zero value otherwise.

func (*MultiFactorWebAuthnSettings) GetUserVerification added in v0.8.0

func (m *MultiFactorWebAuthnSettings) GetUserVerification() string

GetUserVerification returns the UserVerification field if it's non-nil, zero value otherwise.

func (*MultiFactorWebAuthnSettings) String added in v0.8.0

func (m *MultiFactorWebAuthnSettings) String() string

String returns a string representation of MultiFactorWebAuthnSettings.

type Option

type Option func(*Management)

Option is used for passing options to the Management client.

func WithClient

func WithClient(client *http.Client) Option

WithClient configures management to use the provided client.

func WithClientCredentials

func WithClientCredentials(clientID, clientSecret string) Option

WithClientCredentials configures management to authenticate using the client credentials authentication flow.

func WithContext

func WithContext(ctx context.Context) Option

WithContext configures the management client to use the provided context instead of the provided one.

func WithDebug

func WithDebug(d bool) Option

WithDebug configures the management client to dump http requests and responses to stdout.

func WithInsecure

func WithInsecure() Option

WithInsecure configures management to not use an authentication token and use HTTP instead of HTTPS.

This option is available for testing purposes and should not be used in production.

func WithStaticToken

func WithStaticToken(token string) Option

WithStaticToken configures management to authenticate using a static authentication token.

func WithUserAgent

func WithUserAgent(userAgent string) Option

WithUserAgent configures the management client to use the provided user agent string instead of the default one.

type Organization

type Organization struct {
	// Organization identifier
	ID *string `json:"id,omitempty"`

	// Name of this organization.
	Name *string `json:"name,omitempty"`

	// DisplayName of this organization.
	DisplayName *string `json:"display_name,omitempty"`

	// Branding defines how to style the login pages
	Branding *OrganizationBranding `json:"branding,omitempty"`

	// Metadata associated with the organization, in the form of an object with
	// string values (max 255 chars). Maximum of 10 metadata properties allowed.
	Metadata *map[string]interface{} `json:"metadata,omitempty"`
}

Organization is used to allow B2B customers to better manage their partners and customers, and to customize the ways that end-users access their applications.

See: https://auth0.com/docs/manage-users/organizations

func (*Organization) GetBranding

func (o *Organization) GetBranding() *OrganizationBranding

GetBranding returns the Branding field.

func (*Organization) GetDisplayName

func (o *Organization) GetDisplayName() string

GetDisplayName returns the DisplayName field if it's non-nil, zero value otherwise.

func (*Organization) GetID

func (o *Organization) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Organization) GetName

func (o *Organization) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Organization) String

func (o *Organization) String() string

String returns a string representation of Organization.

type OrganizationBranding

type OrganizationBranding struct {
	// URL of logo to display on login page
	LogoURL *string `json:"logo_url,omitempty"`

	// Color scheme used to customize the login pages
	Colors map[string]interface{} `json:"colors,omitempty"`
}

OrganizationBranding holds branding information for an Organization.

func (*OrganizationBranding) GetLogoURL

func (o *OrganizationBranding) GetLogoURL() string

GetLogoURL returns the LogoURL field if it's non-nil, zero value otherwise.

func (*OrganizationBranding) String

func (o *OrganizationBranding) String() string

String returns a string representation of OrganizationBranding.

type OrganizationConnection

type OrganizationConnection struct {
	// ID of the connection.
	ConnectionID *string `json:"connection_id,omitempty"`

	// When true, all users that log in with this connection will be
	// automatically granted membership in the organization. When false, users
	// must be granted membership in the organization before logging in with
	// this connection.
	AssignMembershipOnLogin *bool `json:"assign_membership_on_login,omitempty"`

	// Connection details
	Connection *OrganizationConnectionDetails `json:"connection,omitempty"`
}

OrganizationConnection holds connection information for an Organization.

func (*OrganizationConnection) GetAssignMembershipOnLogin

func (o *OrganizationConnection) GetAssignMembershipOnLogin() bool

GetAssignMembershipOnLogin returns the AssignMembershipOnLogin field if it's non-nil, zero value otherwise.

func (*OrganizationConnection) GetConnection

GetConnection returns the Connection field.

func (*OrganizationConnection) GetConnectionID

func (o *OrganizationConnection) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*OrganizationConnection) String

func (o *OrganizationConnection) String() string

String returns a string representation of OrganizationConnection.

type OrganizationConnectionDetails

type OrganizationConnectionDetails struct {
	// The name of the enabled connection.
	Name *string `json:"name,omitempty"`

	// The strategy of the enabled connection.
	Strategy *string `json:"strategy,omitempty"`
}

OrganizationConnectionDetails holds connection details for an Organization.

func (*OrganizationConnectionDetails) GetName

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*OrganizationConnectionDetails) GetStrategy

func (o *OrganizationConnectionDetails) GetStrategy() string

GetStrategy returns the Strategy field if it's non-nil, zero value otherwise.

func (*OrganizationConnectionDetails) String

String returns a string representation of OrganizationConnectionDetails.

type OrganizationConnectionList

type OrganizationConnectionList struct {
	List
	OrganizationConnections []*OrganizationConnection `json:"enabled_connections"`
}

OrganizationConnectionList is a list of OrganizationConnection.

func (*OrganizationConnectionList) String

func (o *OrganizationConnectionList) String() string

String returns a string representation of OrganizationConnectionList.

type OrganizationInvitation

type OrganizationInvitation struct {
	// The id of the user invitation.
	ID *string `json:"id,omitempty"`

	// Organization identifier
	OrganizationID *string `json:"organization_id,omitempty"`

	Inviter *OrganizationInvitationInviter `json:"inviter,omitempty"`

	Invitee *OrganizationInvitationInvitee `json:"invitee,omitempty"`

	// The invitation url to be send to the invitee.
	InvitationURL *string `json:"invitation_url,omitempty"`

	// The ISO 8601 formatted timestamp representing the creation time of the
	// invitation.
	CreatedAt *string `json:"created_at,omitempty"`

	// Number of seconds for which the invitation is valid before expiration. If
	// unspecified or set to 0, this value defaults to 604800 seconds (7 days).
	// Max value: 2592000 seconds (30 days).
	TTLSec *int `json:"ttl_sec,omitempty"`

	// The ISO 8601 formatted timestamp representing the expiration time of the
	// invitation.
	ExpiresAt *string `json:"expires_at,omitempty"`

	// Auth0 client ID. Used to resolve the application's login initiation
	// endpoint.
	ClientID *string `json:"client_id,omitempty"`

	// The id of the connection to force invitee to authenticate with.
	ConnectionID *string `json:"connection_id,omitempty"`

	// Data related to the user that does affect the application's core
	// functionality.
	AppMetadata map[string]interface{} `json:"app_metadata,omitempty"`

	// Data related to the user that does not affect the application's core
	// functionality.
	UserMetadata map[string]interface{} `json:"user_metadata,omitempty"`

	// List of roles IDs to associated with the user.
	Roles []string `json:"roles,omitempty"`

	// The id of the invitation ticket
	TicketID *string `json:"ticket_id,omitempty"`

	// Whether the user will receive an invitation email (true) or no email
	// (false), true by default
	SendInvitationEmail *bool `json:"send_invitation_email,omitempty"`
}

OrganizationInvitation holds information on the invitation to an Organization.

func (*OrganizationInvitation) GetClientID

func (o *OrganizationInvitation) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetConnectionID

func (o *OrganizationInvitation) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetCreatedAt

func (o *OrganizationInvitation) GetCreatedAt() string

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetExpiresAt

func (o *OrganizationInvitation) GetExpiresAt() string

GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetID

func (o *OrganizationInvitation) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetInvitationURL

func (o *OrganizationInvitation) GetInvitationURL() string

GetInvitationURL returns the InvitationURL field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetInvitee

GetInvitee returns the Invitee field.

func (*OrganizationInvitation) GetInviter

GetInviter returns the Inviter field.

func (*OrganizationInvitation) GetOrganizationID

func (o *OrganizationInvitation) GetOrganizationID() string

GetOrganizationID returns the OrganizationID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetSendInvitationEmail

func (o *OrganizationInvitation) GetSendInvitationEmail() bool

GetSendInvitationEmail returns the SendInvitationEmail field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetTTLSec

func (o *OrganizationInvitation) GetTTLSec() int

GetTTLSec returns the TTLSec field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetTicketID

func (o *OrganizationInvitation) GetTicketID() string

GetTicketID returns the TicketID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) String

func (o *OrganizationInvitation) String() string

String returns a string representation of OrganizationInvitation.

type OrganizationInvitationInvitee

type OrganizationInvitationInvitee struct {
	// The invitee's email.
	Email *string `json:"email,omitempty"`
}

OrganizationInvitationInvitee holds the name of the invitee.

func (*OrganizationInvitationInvitee) GetEmail

func (o *OrganizationInvitationInvitee) GetEmail() string

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*OrganizationInvitationInvitee) String

String returns a string representation of OrganizationInvitationInvitee.

type OrganizationInvitationInviter

type OrganizationInvitationInviter struct {
	// The inviters' name.
	Name *string `json:"name,omitempty"`
}

OrganizationInvitationInviter holds the name of the inviter.

func (*OrganizationInvitationInviter) GetName

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*OrganizationInvitationInviter) String

String returns a string representation of OrganizationInvitationInviter.

type OrganizationInvitationList

type OrganizationInvitationList struct {
	List
	OrganizationInvitations []*OrganizationInvitation `json:"invitations"`
}

OrganizationInvitationList is a list of OrganizationInvitations.

func (*OrganizationInvitationList) String

func (o *OrganizationInvitationList) String() string

String returns a string representation of OrganizationInvitationList.

type OrganizationList

type OrganizationList struct {
	List
	Organizations []*Organization `json:"organizations"`
}

OrganizationList is a list of Organizations.

func (*OrganizationList) String

func (o *OrganizationList) String() string

String returns a string representation of OrganizationList.

type OrganizationManager

type OrganizationManager struct {
	*Management
}

OrganizationManager is used for managing an Organization.

func (*OrganizationManager) AddConnection

func (m *OrganizationManager) AddConnection(id string, c *OrganizationConnection, opts ...RequestOption) (err error)

AddConnection adds connections to an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_enabled_connections

func (*OrganizationManager) AddMembers

func (m *OrganizationManager) AddMembers(id string, memberIDs []string, opts ...RequestOption) (err error)

AddMembers adds members to an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_members

func (*OrganizationManager) AssignMemberRoles

func (m *OrganizationManager) AssignMemberRoles(id string, memberID string, roles []string, opts ...RequestOption) (err error)

AssignMemberRoles assigns one or more roles to a given user that will be applied in the context of the provided organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_organization_member_roles

func (*OrganizationManager) Connection

func (m *OrganizationManager) Connection(id string, connectionID string, opts ...RequestOption) (c *OrganizationConnection, err error)

Connection retrieves an enabled connection for an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_enabled_connections_by_connectionId

func (*OrganizationManager) Connections

func (m *OrganizationManager) Connections(id string, opts ...RequestOption) (c *OrganizationConnectionList, err error)

Connections retrieves connections enabled for an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_enabled_connections

func (*OrganizationManager) Create

func (m *OrganizationManager) Create(o *Organization, opts ...RequestOption) (err error)

Create an Organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_organizations

func (*OrganizationManager) CreateInvitation

func (m *OrganizationManager) CreateInvitation(id string, i *OrganizationInvitation, opts ...RequestOption) (err error)

CreateInvitation creates invitations to an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_invitations

func (*OrganizationManager) Delete

func (m *OrganizationManager) Delete(id string, opts ...RequestOption) (err error)

Delete a specific organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_organizations_by_id

func (*OrganizationManager) DeleteConnection

func (m *OrganizationManager) DeleteConnection(id string, connectionID string, opts ...RequestOption) (err error)

DeleteConnection deletes connections from an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_enabled_connections_by_connectionId

func (*OrganizationManager) DeleteInvitation

func (m *OrganizationManager) DeleteInvitation(id string, invitationID string, opts ...RequestOption) (err error)

DeleteInvitation deletes an invitation to an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_invitations_by_invitation_id

func (*OrganizationManager) DeleteMember

func (m *OrganizationManager) DeleteMember(id string, memberIDs []string, opts ...RequestOption) (err error)

DeleteMember deletes members from an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_members

func (*OrganizationManager) DeleteMemberRoles

func (m *OrganizationManager) DeleteMemberRoles(id string, memberID string, roles []string, opts ...RequestOption) (err error)

DeleteMemberRoles removes one or more roles from a given user in the context of the provided organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_organization_member_roles

func (*OrganizationManager) Invitation

func (m *OrganizationManager) Invitation(id string, invitationID string, opts ...RequestOption) (i *OrganizationInvitation, err error)

Invitation retrieves an invitation to an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_invitations_by_invitation_id

func (*OrganizationManager) Invitations

func (m *OrganizationManager) Invitations(id string, opts ...RequestOption) (i *OrganizationInvitationList, err error)

Invitations retrieves invitations to organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_invitations

func (*OrganizationManager) List

func (m *OrganizationManager) List(opts ...RequestOption) (o *OrganizationList, err error)

List available organizations.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_organizations

func (*OrganizationManager) MemberRoles

func (m *OrganizationManager) MemberRoles(id string, memberID string, opts ...RequestOption) (r *OrganizationMemberRoleList, err error)

MemberRoles retrieves the roles assigned to an organization member.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_organization_member_roles

func (*OrganizationManager) Members

func (m *OrganizationManager) Members(id string, opts ...RequestOption) (o *OrganizationMemberList, err error)

Members lists organization members.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_members

func (*OrganizationManager) Read

func (m *OrganizationManager) Read(id string, opts ...RequestOption) (o *Organization, err error)

Get a specific organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_organizations_by_id

func (*OrganizationManager) ReadByName

func (m *OrganizationManager) ReadByName(name string, opts ...RequestOption) (o *Organization, err error)

ReadByName retrieves a specific organization by name.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_name_by_name

func (*OrganizationManager) Update

func (m *OrganizationManager) Update(id string, o *Organization, opts ...RequestOption) (err error)

Update an organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/patch_organizations_by_id

func (*OrganizationManager) UpdateConnection

func (m *OrganizationManager) UpdateConnection(id string, connectionID string, c *OrganizationConnection, opts ...RequestOption) (err error)

UpdateConnection updates an enabled_connection belonging to an Organization.

See: https://auth0.com/docs/api/management/v2/#!/Organizations/patch_enabled_connections_by_connectionId

type OrganizationMember

type OrganizationMember struct {
	UserID  *string `json:"user_id,omitempty"`
	Picture *string `json:"picture,omitempty"`
	Name    *string `json:"name,omitempty"`
	Email   *string `json:"email,omitempty"`
}

OrganizationMember holds member information for an Organization.

func (*OrganizationMember) GetEmail

func (o *OrganizationMember) GetEmail() string

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*OrganizationMember) GetName

func (o *OrganizationMember) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*OrganizationMember) GetPicture

func (o *OrganizationMember) GetPicture() string

GetPicture returns the Picture field if it's non-nil, zero value otherwise.

func (*OrganizationMember) GetUserID

func (o *OrganizationMember) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*OrganizationMember) String

func (o *OrganizationMember) String() string

String returns a string representation of OrganizationMember.

type OrganizationMemberList

type OrganizationMemberList struct {
	List
	Members []OrganizationMember `json:"members"`
}

OrganizationMemberList is a list of OrganizationMembers.

func (*OrganizationMemberList) String

func (o *OrganizationMemberList) String() string

String returns a string representation of OrganizationMemberList.

type OrganizationMemberRole

type OrganizationMemberRole struct {
	// ID for this role.
	ID *string `json:"id,omitempty"`

	// Name of the role.
	Name *string `json:"name,omitempty"`

	// Description of the role.
	Description *string `json:"description,omitempty"`
}

OrganizationMemberRole holds member role information.

func (*OrganizationMemberRole) GetDescription

func (o *OrganizationMemberRole) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*OrganizationMemberRole) GetID

func (o *OrganizationMemberRole) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*OrganizationMemberRole) GetName

func (o *OrganizationMemberRole) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*OrganizationMemberRole) String

func (o *OrganizationMemberRole) String() string

String returns a string representation of OrganizationMemberRole.

type OrganizationMemberRoleList

type OrganizationMemberRoleList struct {
	List
	Roles []OrganizationMemberRole `json:"roles"`
}

OrganizationMemberRoleList is a list of OrganizationMemberRoles.

func (*OrganizationMemberRoleList) String

func (o *OrganizationMemberRoleList) String() string

String returns a string representation of OrganizationMemberRoleList.

type Permission

type Permission struct {
	// The resource server that the permission is attached to.
	ResourceServerIdentifier *string `json:"resource_server_identifier,omitempty"`

	// The name of the resource server.
	ResourceServerName *string `json:"resource_server_name,omitempty"`

	// The name of the permission.
	Name *string `json:"permission_name,omitempty"`

	// The description of the permission.
	Description *string `json:"description,omitempty"`
}

Permission is granted to a Role.

func (*Permission) GetDescription

func (p *Permission) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*Permission) GetName

func (p *Permission) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Permission) GetResourceServerIdentifier

func (p *Permission) GetResourceServerIdentifier() string

GetResourceServerIdentifier returns the ResourceServerIdentifier field if it's non-nil, zero value otherwise.

func (*Permission) GetResourceServerName

func (p *Permission) GetResourceServerName() string

GetResourceServerName returns the ResourceServerName field if it's non-nil, zero value otherwise.

func (*Permission) String

func (p *Permission) String() string

String returns a string representation of Permission.

type PermissionList

type PermissionList struct {
	List
	Permissions []*Permission `json:"permissions"`
}

PermissionList holds a list of Permissions.

func (*PermissionList) String

func (p *PermissionList) String() string

String returns a string representation of PermissionList.

type PhoneMessageTypes

type PhoneMessageTypes struct {
	MessageTypes *[]string `json:"message_types,omitempty"`
}

PhoneMessageTypes holds message types for phone MultiFactor Authentication.

func (*PhoneMessageTypes) GetMessageTypes

func (p *PhoneMessageTypes) GetMessageTypes() []string

GetMessageTypes returns the MessageTypes field if it's non-nil, zero value otherwise.

func (*PhoneMessageTypes) String

func (p *PhoneMessageTypes) String() string

String returns a string representation of PhoneMessageTypes.

type PreLogin

type PreLogin struct {
	MaxAttempts *int `json:"max_attempts,omitempty"`
	Rate        *int `json:"rate,omitempty"`
}

PreLogin is used to customize thresholds for login flow.

func (*PreLogin) GetMaxAttempts

func (p *PreLogin) GetMaxAttempts() int

GetMaxAttempts returns the MaxAttempts field if it's non-nil, zero value otherwise.

func (*PreLogin) GetRate

func (p *PreLogin) GetRate() int

GetRate returns the Rate field if it's non-nil, zero value otherwise.

func (*PreLogin) String

func (p *PreLogin) String() string

String returns a string representation of PreLogin.

type PreUserRegistration

type PreUserRegistration struct {
	MaxAttempts *int `json:"max_attempts,omitempty"`
	Rate        *int `json:"rate,omitempty"`
}

PreUserRegistration is used to customize thresholds for sign up flow.

func (*PreUserRegistration) GetMaxAttempts

func (p *PreUserRegistration) GetMaxAttempts() int

GetMaxAttempts returns the MaxAttempts field if it's non-nil, zero value otherwise.

func (*PreUserRegistration) GetRate

func (p *PreUserRegistration) GetRate() int

GetRate returns the Rate field if it's non-nil, zero value otherwise.

func (*PreUserRegistration) String

func (p *PreUserRegistration) String() string

String returns a string representation of PreUserRegistration.

type Prompt

type Prompt struct {
	// Which login experience to use. Can be `new` or `classic`.
	UniversalLoginExperience string `json:"universal_login_experience,omitempty"`

	// IdentifierFirst determines if the login screen prompts for just the identifier, identifier and password first.
	IdentifierFirst *bool `json:"identifier_first,omitempty"`

	// WebAuthnPlatformFirstFactor determines if the login screen uses identifier and biometrics first.
	WebAuthnPlatformFirstFactor *bool `json:"webauthn_platform_first_factor,omitempty"`
}

Prompt is used within the Login Page.

See: https://auth0.com/docs/customize/universal-login-pages/customize-login-text-prompts

func (*Prompt) GetIdentifierFirst

func (p *Prompt) GetIdentifierFirst() bool

GetIdentifierFirst returns the IdentifierFirst field if it's non-nil, zero value otherwise.

func (*Prompt) GetWebAuthnPlatformFirstFactor added in v0.6.4

func (p *Prompt) GetWebAuthnPlatformFirstFactor() bool

GetWebAuthnPlatformFirstFactor returns the WebAuthnPlatformFirstFactor field if it's non-nil, zero value otherwise.

func (*Prompt) String

func (p *Prompt) String() string

String returns a string representation of Prompt.

type PromptManager

type PromptManager struct {
	*Management
}

PromptManager is used for managing a Prompt.

func (*PromptManager) CustomText

func (m *PromptManager) CustomText(p string, l string, opts ...RequestOption) (t map[string]interface{}, err error)

CustomText retrieves the custom text for a specific prompt and language.

See: https://auth0.com/docs/api/management/v2#!/Prompts/get_custom_text_by_language

func (*PromptManager) Read

func (m *PromptManager) Read(opts ...RequestOption) (p *Prompt, err error)

Read retrieves prompts settings.

See: https://auth0.com/docs/api/management/v2#!/Prompts/get_prompts

func (*PromptManager) SetCustomText

func (m *PromptManager) SetCustomText(p string, l string, b map[string]interface{}, opts ...RequestOption) (err error)

SetCustomText sets the custom text for a specific prompt. Existing texts will be overwritten.

See: https://auth0.com/docs/api/management/v2#!/Prompts/put_custom_text_by_language

func (*PromptManager) Update

func (m *PromptManager) Update(p *Prompt, opts ...RequestOption) error

Update prompts settings.

See: https://auth0.com/docs/api/management/v2#!/Prompts/patch_prompts

type RequestOption

type RequestOption interface {
	// contains filtered or unexported methods
}

RequestOption configures a call (typically to retrieve a resource) to Auth0 with query parameters.

func Body

func Body(b []byte) RequestOption

Body configures a requests body.

func Context

func Context(ctx context.Context) RequestOption

Context configures a request to use the specified context.

func ExcludeFields

func ExcludeFields(fields ...string) RequestOption

ExcludeFields configures a request to exclude the desired fields.

func From added in v0.9.3

func From(checkpoint string) RequestOption

From configures a request to start from the specified checkpoint.

func Header(key, value string) RequestOption

Header configures a request to add HTTP headers to requests made to Auth0.

func IncludeFields

func IncludeFields(fields ...string) RequestOption

IncludeFields configures a request to include the desired fields.

func IncludeTotals

func IncludeTotals(include bool) RequestOption

IncludeTotals configures a request to include totals.

func Page

func Page(page int) RequestOption

Page configures a request to receive a specific page, if the results where concatenated.

func Parameter

func Parameter(key, value string) RequestOption

Parameter configures a request to add arbitrary query parameters to requests made to Auth0.

func PerPage

func PerPage(items int) RequestOption

PerPage configures a request to limit the amount of items in the result.

func Query

func Query(s string) RequestOption

Query configures a request to search on specific query parameters.

For example:

List(Query(`email:"alice@example.com"`))
List(Query(`name:"jane smith"`))
List(Query(`logins_count:[100 TO 200}`))
List(Query(`logins_count:{100 TO *]`))

See: https://auth0.com/docs/users/search/v3/query-syntax

func Take added in v0.9.3

func Take(items int) RequestOption

Take configures a request to limit the amount of items in the result for a checkpoint based request.

type ResourceServer

type ResourceServer struct {
	// A generated string identifying the resource server.
	ID *string `json:"id,omitempty"`

	// The name of the resource server. Must contain at least one character.
	// Does not allow '<' or '>'
	Name *string `json:"name,omitempty"`

	// The identifier of the resource server.
	Identifier *string `json:"identifier,omitempty"`

	// Scopes supported by the resource server.
	Scopes []*ResourceServerScope `json:"scopes,omitempty"`

	// The algorithm used to sign tokens ["HS256" or "RS256"].
	SigningAlgorithm *string `json:"signing_alg,omitempty"`

	// The secret used to sign tokens when using symmetric algorithms.
	SigningSecret *string `json:"signing_secret,omitempty"`

	// Allows issuance of refresh tokens for this entity.
	AllowOfflineAccess *bool `json:"allow_offline_access,omitempty"`

	// The amount of time in seconds that the token will be valid after being
	// issued.
	TokenLifetime *int `json:"token_lifetime,omitempty"`

	// The amount of time in seconds that the token will be valid after being
	// issued from browser based flows. Value cannot be larger than
	// token_lifetime.
	TokenLifetimeForWeb *int `json:"token_lifetime_for_web,omitempty"`

	// Flag this entity as capable of skipping consent.
	SkipConsentForVerifiableFirstPartyClients *bool `json:"skip_consent_for_verifiable_first_party_clients,omitempty"`

	// A URI from which to retrieve JWKs for this resource server used for
	// verifying the JWT sent to Auth0 for token introspection.
	VerificationLocation *string `json:"verificationLocation,omitempty"`

	Options map[string]interface{} `json:"options,omitempty"`

	// Enables the enforcement of the authorization policies.
	EnforcePolicies *bool `json:"enforce_policies,omitempty"`

	// The dialect for the access token ["access_token" or "access_token_authz"].
	TokenDialect *string `json:"token_dialect,omitempty"`
}

ResourceServer is an entity that represents an external resource, capable of accepting and responding to protected resource requests made by applications.

func (*ResourceServer) GetAllowOfflineAccess

func (r *ResourceServer) GetAllowOfflineAccess() bool

GetAllowOfflineAccess returns the AllowOfflineAccess field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetEnforcePolicies

func (r *ResourceServer) GetEnforcePolicies() bool

GetEnforcePolicies returns the EnforcePolicies field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetID

func (r *ResourceServer) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetIdentifier

func (r *ResourceServer) GetIdentifier() string

GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetName

func (r *ResourceServer) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetSigningAlgorithm

func (r *ResourceServer) GetSigningAlgorithm() string

GetSigningAlgorithm returns the SigningAlgorithm field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetSigningSecret

func (r *ResourceServer) GetSigningSecret() string

GetSigningSecret returns the SigningSecret field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetSkipConsentForVerifiableFirstPartyClients

func (r *ResourceServer) GetSkipConsentForVerifiableFirstPartyClients() bool

GetSkipConsentForVerifiableFirstPartyClients returns the SkipConsentForVerifiableFirstPartyClients field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetTokenDialect

func (r *ResourceServer) GetTokenDialect() string

GetTokenDialect returns the TokenDialect field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetTokenLifetime

func (r *ResourceServer) GetTokenLifetime() int

GetTokenLifetime returns the TokenLifetime field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetTokenLifetimeForWeb

func (r *ResourceServer) GetTokenLifetimeForWeb() int

GetTokenLifetimeForWeb returns the TokenLifetimeForWeb field if it's non-nil, zero value otherwise.

func (*ResourceServer) GetVerificationLocation

func (r *ResourceServer) GetVerificationLocation() string

GetVerificationLocation returns the VerificationLocation field if it's non-nil, zero value otherwise.

func (*ResourceServer) String

func (r *ResourceServer) String() string

String returns a string representation of ResourceServer.

type ResourceServerList

type ResourceServerList struct {
	List
	ResourceServers []*ResourceServer `json:"resource_servers"`
}

ResourceServerList is a list of ResourceServers.

func (*ResourceServerList) String

func (r *ResourceServerList) String() string

String returns a string representation of ResourceServerList.

type ResourceServerManager

type ResourceServerManager struct {
	*Management
}

ResourceServerManager is used for managing a ResourceServer.

func (*ResourceServerManager) Create

func (m *ResourceServerManager) Create(rs *ResourceServer, opts ...RequestOption) (err error)

Create a resource server.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/post_resource_servers

func (*ResourceServerManager) Delete

func (m *ResourceServerManager) Delete(id string, opts ...RequestOption) (err error)

Delete a resource server.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/delete_resource_servers_by_id

func (*ResourceServerManager) List

func (m *ResourceServerManager) List(opts ...RequestOption) (rl *ResourceServerList, err error)

List all resource server.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource_servers

Example
package main

import (
	"os"

	"github.com/auth0/go-auth0/management"
)

var (
	domain = os.Getenv("AUTH0_DOMAIN")
	id     = os.Getenv("AUTH0_CLIENT_ID")
	secret = os.Getenv("AUTH0_CLIENT_SECRET")

	api *management.Management
)

func init() {
	var err error
	api, err = management.New(domain, management.WithClientCredentials(id, secret))
	if err != nil {
		panic(err)
	}
}

func main() {
	l, err := api.ResourceServer.List()
	if err != nil {
		// handle err
		return
	}
	_ = l.ResourceServers
}
Output:

func (*ResourceServerManager) Read

func (m *ResourceServerManager) Read(id string, opts ...RequestOption) (rs *ResourceServer, err error)

Read retrieves a resource server by its id or audience.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource_servers_by_id

func (*ResourceServerManager) Stream

func (m *ResourceServerManager) Stream(fn func(s *ResourceServer), opts ...RequestOption) error

Stream is a helper method which handles pagination.

func (*ResourceServerManager) Update

func (m *ResourceServerManager) Update(id string, rs *ResourceServer, opts ...RequestOption) (err error)

Update a resource server.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/patch_resource_servers_by_id

type ResourceServerScope

type ResourceServerScope struct {
	// The scope name. Use the format <action>:<resource>.
	// For example 'delete:client_grants'.
	Value *string `json:"value,omitempty"`

	// Description of the scope.
	Description *string `json:"description,omitempty"`
}

ResourceServerScope defines the specific actions, resource servers can be allowed to do.

func (*ResourceServerScope) GetDescription

func (r *ResourceServerScope) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*ResourceServerScope) GetValue

func (r *ResourceServerScope) GetValue() string

GetValue returns the Value field if it's non-nil, zero value otherwise.

func (*ResourceServerScope) String

func (r *ResourceServerScope) String() string

String returns a string representation of ResourceServerScope.

type Role

type Role struct {
	// A unique ID for the role.
	ID *string `json:"id,omitempty"`

	// The name of the role created.
	Name *string `json:"name,omitempty"`

	// A description of the role created.
	Description *string `json:"description,omitempty"`
}

Role is used to assign roles to a User.

func (*Role) GetDescription

func (r *Role) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*Role) GetID

func (r *Role) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Role) GetName

func (r *Role) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Role) String

func (r *Role) String() string

String returns a string representation of Role.

type RoleList

type RoleList struct {
	List
	Roles []*Role `json:"roles"`
}

RoleList holds a list of Roles.

func (*RoleList) String

func (r *RoleList) String() string

String returns a string representation of RoleList.

type RoleManager

type RoleManager struct {
	*Management
}

RoleManager manages Auth0 Role resources.

func (*RoleManager) AssignUsers

func (m *RoleManager) AssignUsers(id string, users []*User, opts ...RequestOption) error

AssignUsers assigns users to a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/post_role_users

func (*RoleManager) AssociatePermissions

func (m *RoleManager) AssociatePermissions(id string, permissions []*Permission, opts ...RequestOption) error

AssociatePermissions associates permissions to a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/post_role_permission_assignment

func (*RoleManager) Create

func (m *RoleManager) Create(r *Role, opts ...RequestOption) error

Create a new role.

See: https://auth0.com/docs/api/management/v2#!/Roles/post_roles

Example
r := &management.Role{
	Name:        auth0.String("admin"),
	Description: auth0.String("Administrator"),
}
err := api.Role.Create(r)
if err != nil {
	// handle err
	return
}
defer api.Role.Delete(r.GetID())
Output:

func (*RoleManager) Delete

func (m *RoleManager) Delete(id string, opts ...RequestOption) (err error)

Delete a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/delete_roles_by_id

func (*RoleManager) List

func (m *RoleManager) List(opts ...RequestOption) (r *RoleList, err error)

List all roles that can be assigned to users or groups.

See: https://auth0.com/docs/api/management/v2#!/Roles/get_roles

func (*RoleManager) Permissions

func (m *RoleManager) Permissions(id string, opts ...RequestOption) (p *PermissionList, err error)

Permissions retrieves all permissions granted by a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/get_role_permission

func (*RoleManager) Read

func (m *RoleManager) Read(id string, opts ...RequestOption) (r *Role, err error)

Retrieve a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/get_roles_by_id

func (*RoleManager) RemovePermissions

func (m *RoleManager) RemovePermissions(id string, permissions []*Permission, opts ...RequestOption) error

RemovePermissions removes permissions associated to a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/delete_role_permission_assignment

func (*RoleManager) Update

func (m *RoleManager) Update(id string, r *Role, opts ...RequestOption) (err error)

Update a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/patch_roles_by_id

func (*RoleManager) Users

func (m *RoleManager) Users(id string, opts ...RequestOption) (u *UserList, err error)

Users retrieves all users associated with a role.

See: https://auth0.com/docs/api/management/v2#!/Roles/get_role_user

type Rule

type Rule struct {
	// The rule's identifier.
	ID *string `json:"id,omitempty"`

	// The name of the rule. Can only contain alphanumeric characters, spaces
	// and '-'. Can neither start nor end with '-' or spaces.
	Name *string `json:"name,omitempty"`

	// A script that contains the rule's code.
	Script *string `json:"script,omitempty"`

	// The rule's order in relation to other rules. A rule with a lower order
	// than another rule executes first. If no order is provided it will
	// automatically be one greater than the current maximum.
	Order *int `json:"order,omitempty"`

	// Enabled should be set to true if the rule is enabled, false otherwise.
	Enabled *bool `json:"enabled,omitempty"`
}

Rule is used as part of the authentication pipeline.

func (*Rule) GetEnabled

func (r *Rule) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*Rule) GetID

func (r *Rule) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*Rule) GetName

func (r *Rule) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*Rule) GetOrder

func (r *Rule) GetOrder() int

GetOrder returns the Order field if it's non-nil, zero value otherwise.

func (*Rule) GetScript

func (r *Rule) GetScript() string

GetScript returns the Script field if it's non-nil, zero value otherwise.

func (*Rule) String

func (r *Rule) String() string

String returns a string representation of Rule.

type RuleConfig

type RuleConfig struct {
	// The key for a RuleConfigs config
	Key *string `json:"key,omitempty"`

	// The value for the rules config
	Value *string `json:"value,omitempty"`
}

RuleConfig are key value pairs used to configure Rules.

func (*RuleConfig) GetKey

func (r *RuleConfig) GetKey() string

GetKey returns the Key field if it's non-nil, zero value otherwise.

func (*RuleConfig) GetValue

func (r *RuleConfig) GetValue() string

GetValue returns the Value field if it's non-nil, zero value otherwise.

func (*RuleConfig) String

func (r *RuleConfig) String() string

String returns a string representation of RuleConfig.

type RuleConfigManager

type RuleConfigManager struct {
	*Management
}

RuleConfigManager manages Auth0 RuleConfig resources.

func (*RuleConfigManager) Delete

func (m *RuleConfigManager) Delete(key string, opts ...RequestOption) (err error)

Delete a rule configuration variable identified by its key.

See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/delete_rules_configs_by_key

func (*RuleConfigManager) List

func (m *RuleConfigManager) List(opts ...RequestOption) (r []*RuleConfig, err error)

List all rule configuration variables.

See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/get_rules_configs

func (*RuleConfigManager) Read

func (m *RuleConfigManager) Read(key string, opts ...RequestOption) (*RuleConfig, error)

Read a rule configuration variable by key.

Note: For security, config variable values cannot be retrieved outside rule execution.

See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/get_rules_configs

func (*RuleConfigManager) Upsert

func (m *RuleConfigManager) Upsert(key string, r *RuleConfig, opts ...RequestOption) (err error)

Upsert sets a rule configuration variable.

See: https://auth0.com/docs/api/management/v2#!/Rules_Configs/put_rules_configs_by_key

type RuleList

type RuleList struct {
	List
	Rules []*Rule `json:"rules"`
}

RuleList holds a list of Rules.

func (*RuleList) String

func (r *RuleList) String() string

String returns a string representation of RuleList.

type RuleManager

type RuleManager struct {
	*Management
}

RuleManager manages Auth0 Rule resources.

func (*RuleManager) Create

func (m *RuleManager) Create(r *Rule, opts ...RequestOption) error

Create a new rule.

Note: Changing a rule's stage of execution from the default `login_success` can change the rule's function signature to have user omitted.

See: https://auth0.com/docs/api/management/v2#!/Rules/post_rules

func (*RuleManager) Delete

func (m *RuleManager) Delete(id string, opts ...RequestOption) error

Delete a rule.

See: https://auth0.com/docs/api/management/v2#!/Rules/delete_rules_by_id

func (*RuleManager) List

func (m *RuleManager) List(opts ...RequestOption) (r *RuleList, err error)

List all rules.

See: https://auth0.com/docs/api/management/v2#!/Rules/get_rules

func (*RuleManager) Read

func (m *RuleManager) Read(id string, opts ...RequestOption) (r *Rule, err error)

Retrieve rule details. Accepts a list of fields to include or exclude in the result.

See: https://auth0.com/docs/api/management/v2#!/Rules/get_rules_by_id

func (*RuleManager) Update

func (m *RuleManager) Update(id string, r *Rule, opts ...RequestOption) error

Update an existing rule.

See: https://auth0.com/docs/api/management/v2#!/Rules/patch_rules_by_id

type SigningKey

type SigningKey struct {
	// The key id of the signing key.
	KID *string `json:"kid,omitempty"`

	// The public certificate of the signing key.
	Cert *string `json:"cert,omitempty"`

	// The public certificate of the signing key in pkcs7 format.
	PKCS7 *string `json:"pkcs7,omitempty"`

	// True if the key is the the current key.
	Current *bool `json:"current,omitempty"`

	// True if the key is the the next key.
	Next *bool `json:"next,omitempty"`

	// True if the key is the the previous key.
	Previous *bool `json:"previous,omitempty"`

	// The date and time when the key became the current key.
	CurrentSince *time.Time `json:"current_since,omitempty"`

	// The date and time when the current key was rotated.
	CurrentUntil *time.Time `json:"current_until,omitempty"`

	// The cert fingerprint.
	Fingerprint *string `json:"fingerprint,omitempty"`

	// The cert thumbprint.
	Thumbprint *string `json:"thumbprint,omitempty"`

	// True if the key is revoked.
	Revoked *bool `json:"revoked,omitempty"`

	// The date and time when the key was revoked.
	RevokedAt *time.Time `json:"revoked_at,omitempty"`
}

SigningKey is used for signing tokens.

func (*SigningKey) GetCert

func (s *SigningKey) GetCert() string

GetCert returns the Cert field if it's non-nil, zero value otherwise.

func (*SigningKey) GetCurrent

func (s *SigningKey) GetCurrent() bool

GetCurrent returns the Current field if it's non-nil, zero value otherwise.

func (*SigningKey) GetCurrentSince

func (s *SigningKey) GetCurrentSince() time.Time

GetCurrentSince returns the CurrentSince field if it's non-nil, zero value otherwise.

func (*SigningKey) GetCurrentUntil

func (s *SigningKey) GetCurrentUntil() time.Time

GetCurrentUntil returns the CurrentUntil field if it's non-nil, zero value otherwise.

func (*SigningKey) GetFingerprint

func (s *SigningKey) GetFingerprint() string

GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise.

func (*SigningKey) GetKID

func (s *SigningKey) GetKID() string

GetKID returns the KID field if it's non-nil, zero value otherwise.

func (*SigningKey) GetNext

func (s *SigningKey) GetNext() bool

GetNext returns the Next field if it's non-nil, zero value otherwise.

func (*SigningKey) GetPKCS7

func (s *SigningKey) GetPKCS7() string

GetPKCS7 returns the PKCS7 field if it's non-nil, zero value otherwise.

func (*SigningKey) GetPrevious

func (s *SigningKey) GetPrevious() bool

GetPrevious returns the Previous field if it's non-nil, zero value otherwise.

func (*SigningKey) GetRevoked

func (s *SigningKey) GetRevoked() bool

GetRevoked returns the Revoked field if it's non-nil, zero value otherwise.

func (*SigningKey) GetRevokedAt

func (s *SigningKey) GetRevokedAt() time.Time

GetRevokedAt returns the RevokedAt field if it's non-nil, zero value otherwise.

func (*SigningKey) GetThumbprint

func (s *SigningKey) GetThumbprint() string

GetThumbprint returns the Thumbprint field if it's non-nil, zero value otherwise.

func (*SigningKey) String

func (s *SigningKey) String() string

String returns a string representation of SigningKey.

type SigningKeyManager

type SigningKeyManager struct {
	*Management
}

SigningKeyManager manages Auth0 SigningKey resources.

func (*SigningKeyManager) List

func (m *SigningKeyManager) List(opts ...RequestOption) (ks []*SigningKey, err error)

List all Application Signing Keys.

See: https://auth0.com/docs/api/management/v2#!/Keys/get_signing_keys

func (*SigningKeyManager) Read

func (m *SigningKeyManager) Read(kid string, opts ...RequestOption) (k *SigningKey, err error)

Read an Application Signing Key by its key id.

See: https://auth0.com/docs/api/management/v2#!/Keys/get_signing_key

func (*SigningKeyManager) Revoke

func (m *SigningKeyManager) Revoke(kid string, opts ...RequestOption) (k *SigningKey, err error)

Revoke an Application Signing Key by its key id.

See: https://auth0.com/docs/api/management/v2#!/Keys/put_signing_keys

func (*SigningKeyManager) Rotate

func (m *SigningKeyManager) Rotate(opts ...RequestOption) (k *SigningKey, err error)

Rotate the Application Signing Key.

See: https://auth0.com/docs/api/management/v2#!/Keys/post_signing_keys

type Stage

type Stage struct {
	PreLogin            *PreLogin            `json:"pre-login,omitempty"`
	PreUserRegistration *PreUserRegistration `json:"pre-user-registration,omitempty"`
}

Stage is used to customize thresholds for limiting suspicious traffic in login and sign up flows.

func (*Stage) GetPreLogin

func (s *Stage) GetPreLogin() *PreLogin

GetPreLogin returns the PreLogin field.

func (*Stage) GetPreUserRegistration

func (s *Stage) GetPreUserRegistration() *PreUserRegistration

GetPreUserRegistration returns the PreUserRegistration field.

func (*Stage) String

func (s *Stage) String() string

String returns a string representation of Stage.

type StatManager

type StatManager struct {
	*Management
}

StatManager manages Auth0 DailyStat resources.

func (*StatManager) ActiveUsers

func (m *StatManager) ActiveUsers(opts ...RequestOption) (i int, err error)

ActiveUsers retrieves the number of active users that logged in during the last 30 days.

See: https://auth0.com/docs/api/management/v2#!/Stats/get_active_users

func (*StatManager) Daily

func (m *StatManager) Daily(opts ...RequestOption) (ds []*DailyStat, err error)

Daily retrieves the number of logins, signups and breached-password detections (subscription required) that occurred each day within a specified date range.

See: https://auth0.com/docs/api/management/v2#!/Stats/get_daily

type SuspiciousIPThrottling

type SuspiciousIPThrottling struct {
	Enabled   *bool     `json:"enabled,omitempty"`
	Shields   *[]string `json:"shields,omitempty"`
	AllowList *[]string `json:"allowlist,omitempty"`
	Stage     *Stage    `json:"stage,omitempty"`
}

SuspiciousIPThrottling blocks traffic from any IP address that rapidly attempts too many logins or signups.

See: https://auth0.com/docs/secure/attack-protection/suspicious-ip-throttling

func (*SuspiciousIPThrottling) GetAllowList

func (s *SuspiciousIPThrottling) GetAllowList() []string

GetAllowList returns the AllowList field if it's non-nil, zero value otherwise.

func (*SuspiciousIPThrottling) GetEnabled

func (s *SuspiciousIPThrottling) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*SuspiciousIPThrottling) GetShields

func (s *SuspiciousIPThrottling) GetShields() []string

GetShields returns the Shields field if it's non-nil, zero value otherwise.

func (*SuspiciousIPThrottling) GetStage

func (s *SuspiciousIPThrottling) GetStage() *Stage

GetStage returns the Stage field.

func (*SuspiciousIPThrottling) String

func (s *SuspiciousIPThrottling) String() string

String returns a string representation of SuspiciousIPThrottling.

type Tenant

type Tenant struct {
	// Change password page settings
	ChangePassword *TenantChangePassword `json:"change_password,omitempty"`

	// Guardian MFA page settings
	GuardianMFAPage *TenantGuardianMFAPage `json:"guardian_mfa_page,omitempty"`

	// Default audience for API Authorization
	DefaultAudience *string `json:"default_audience,omitempty"`

	// Name of the connection that will be used for password grants at the token
	// endpoint. Only the following connection types are supported: LDAP, AD,
	// Database Connections, Passwordless, Windows Azure Active Directory, ADFS.
	DefaultDirectory *string `json:"default_directory,omitempty"`

	ErrorPage *TenantErrorPage `json:"error_page,omitempty"`

	DeviceFlow *TenantDeviceFlow `json:"device_flow,omitempty"`

	Flags *TenantFlags `json:"flags,omitempty"`

	// The friendly name of the tenant
	FriendlyName *string `json:"friendly_name,omitempty"`

	// The URL of the tenant logo (recommended size: 150x150)
	PictureURL *string `json:"picture_url,omitempty"`

	// User support email
	SupportEmail *string `json:"support_email,omitempty"`

	// User support URL
	SupportURL *string `json:"support_url,omitempty"`

	// Used to store additional metadata
	UniversalLogin *TenantUniversalLogin `json:"universal_login,omitempty"`

	// A set of URLs that are valid to redirect to after logout from Auth0.
	AllowedLogoutURLs []interface{} `json:"allowed_logout_urls,omitempty"`

	// Login session lifetime, how long the session will stay valid (hours).
	//
	// When marshalling, values are rounded to the nearest integer. If the value
	// is smaller than 1, hours are transformed to minutes and marshaled as
	// session_lifetime_in_minutes instead.
	SessionLifetime *float64 `json:"session_lifetime,omitempty"`

	// Force a user to login after they have been inactive for the specified
	// number (hours).
	//
	// When marshalling, values are rounded to the nearest integer. If the value
	// is smaller than 1, hours are transformed to minutes and marshaled as
	// idle_session_lifetime_in_minutes instead.
	IdleSessionLifetime *float64 `json:"idle_session_lifetime,omitempty"`

	// The selected sandbox version to be used for the extensibility environment
	SandboxVersion *string `json:"sandbox_version,omitempty"`

	// A set of available sandbox versions for the extensibility environment
	SandboxVersionAvailable []interface{} `json:"sandbox_versions_available,omitempty"`

	// The default absolute redirection uri, must be https and cannot contain a
	// fragment.
	DefaultRedirectionURI *string `json:"default_redirection_uri,omitempty"`

	// Supported locales for the UI
	EnabledLocales []interface{} `json:"enabled_locales,omitempty"`

	SessionCookie *TenantSessionCookie `json:"session_cookie,omitempty"`
}

Tenant represents an Auth0 Tenant.

func (*Tenant) GetChangePassword

func (t *Tenant) GetChangePassword() *TenantChangePassword

GetChangePassword returns the ChangePassword field.

func (*Tenant) GetDefaultAudience

func (t *Tenant) GetDefaultAudience() string

GetDefaultAudience returns the DefaultAudience field if it's non-nil, zero value otherwise.

func (*Tenant) GetDefaultDirectory

func (t *Tenant) GetDefaultDirectory() string

GetDefaultDirectory returns the DefaultDirectory field if it's non-nil, zero value otherwise.

func (*Tenant) GetDefaultRedirectionURI

func (t *Tenant) GetDefaultRedirectionURI() string

GetDefaultRedirectionURI returns the DefaultRedirectionURI field if it's non-nil, zero value otherwise.

func (*Tenant) GetDeviceFlow

func (t *Tenant) GetDeviceFlow() *TenantDeviceFlow

GetDeviceFlow returns the DeviceFlow field.

func (*Tenant) GetErrorPage

func (t *Tenant) GetErrorPage() *TenantErrorPage

GetErrorPage returns the ErrorPage field.

func (*Tenant) GetFlags

func (t *Tenant) GetFlags() *TenantFlags

GetFlags returns the Flags field.

func (*Tenant) GetFriendlyName

func (t *Tenant) GetFriendlyName() string

GetFriendlyName returns the FriendlyName field if it's non-nil, zero value otherwise.

func (*Tenant) GetGuardianMFAPage

func (t *Tenant) GetGuardianMFAPage() *TenantGuardianMFAPage

GetGuardianMFAPage returns the GuardianMFAPage field.

func (*Tenant) GetIdleSessionLifetime

func (t *Tenant) GetIdleSessionLifetime() float64

GetIdleSessionLifetime returns the IdleSessionLifetime field if it's non-nil, zero value otherwise.

func (*Tenant) GetPictureURL

func (t *Tenant) GetPictureURL() string

GetPictureURL returns the PictureURL field if it's non-nil, zero value otherwise.

func (*Tenant) GetSandboxVersion

func (t *Tenant) GetSandboxVersion() string

GetSandboxVersion returns the SandboxVersion field if it's non-nil, zero value otherwise.

func (*Tenant) GetSessionCookie added in v0.9.0

func (t *Tenant) GetSessionCookie() *TenantSessionCookie

GetSessionCookie returns the SessionCookie field.

func (*Tenant) GetSessionLifetime

func (t *Tenant) GetSessionLifetime() float64

GetSessionLifetime returns the SessionLifetime field if it's non-nil, zero value otherwise.

func (*Tenant) GetSupportEmail

func (t *Tenant) GetSupportEmail() string

GetSupportEmail returns the SupportEmail field if it's non-nil, zero value otherwise.

func (*Tenant) GetSupportURL

func (t *Tenant) GetSupportURL() string

GetSupportURL returns the SupportURL field if it's non-nil, zero value otherwise.

func (*Tenant) GetUniversalLogin

func (t *Tenant) GetUniversalLogin() *TenantUniversalLogin

GetUniversalLogin returns the UniversalLogin field.

func (*Tenant) MarshalJSON

func (t *Tenant) MarshalJSON() ([]byte, error)

MarshalJSON is a custom serializer for the Tenant type.

func (*Tenant) String

func (t *Tenant) String() string

String returns a string representation of Tenant.

type TenantChangePassword

type TenantChangePassword struct {
	// True to use the custom change password html, false otherwise.
	Enabled *bool `json:"enabled,omitempty"`

	// Replace default change password page with a custom HTML (Liquid syntax is
	// supported).
	HTML *string `json:"html,omitempty"`
}

TenantChangePassword holds settings for the change password page.

func (*TenantChangePassword) GetEnabled

func (t *TenantChangePassword) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*TenantChangePassword) GetHTML

func (t *TenantChangePassword) GetHTML() string

GetHTML returns the HTML field if it's non-nil, zero value otherwise.

func (*TenantChangePassword) String

func (t *TenantChangePassword) String() string

String returns a string representation of TenantChangePassword.

type TenantDeviceFlow

type TenantDeviceFlow struct {
	// The character set for generating a User Code ['base20' or 'digits']
	Charset *string `json:"charset,omitempty"`

	// The mask used to format the generated User Code to a friendly, readable
	// format with possible spaces or hyphens
	Mask *string `json:"mask,omitempty"`
}

TenantDeviceFlow holds settings for the device flow.

func (*TenantDeviceFlow) GetCharset

func (t *TenantDeviceFlow) GetCharset() string

GetCharset returns the Charset field if it's non-nil, zero value otherwise.

func (*TenantDeviceFlow) GetMask

func (t *TenantDeviceFlow) GetMask() string

GetMask returns the Mask field if it's non-nil, zero value otherwise.

func (*TenantDeviceFlow) String

func (t *TenantDeviceFlow) String() string

String returns a string representation of TenantDeviceFlow.

type TenantErrorPage

type TenantErrorPage struct {
	// Replace default error page with a custom HTML (Liquid syntax is
	// supported).
	HTML *string `json:"html,omitempty"`
	// True to show link to log as part of the default error page, false
	// otherwise (default: true).
	ShowLogLink *bool `json:"show_log_link,omitempty"`
	// Redirect to specified url instead of show the default error page
	URL *string `json:"url,omitempty"`
}

TenantErrorPage holds settings for the error page.

func (*TenantErrorPage) GetHTML

func (t *TenantErrorPage) GetHTML() string

GetHTML returns the HTML field if it's non-nil, zero value otherwise.

func (t *TenantErrorPage) GetShowLogLink() bool

GetShowLogLink returns the ShowLogLink field if it's non-nil, zero value otherwise.

func (*TenantErrorPage) GetURL

func (t *TenantErrorPage) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*TenantErrorPage) String

func (t *TenantErrorPage) String() string

String returns a string representation of TenantErrorPage.

type TenantFlags

type TenantFlags struct {
	// This flag determines whether all current connections shall be enabled
	// when a new client is created. Default value is true.
	EnableClientConnections *bool `json:"enable_client_connections,omitempty"`

	// This flag enables the API section in the Auth0 Management Dashboard.
	EnableAPIsSection *bool `json:"enable_apis_section,omitempty"`

	// If set to true all Impersonation functionality is disabled for the
	// Tenant. This is a read-only attribute.
	DisableImpersonation *bool `json:"disable_impersonation,omitempty"`

	// This flag enables advanced API Authorization scenarios.
	EnablePipeline2 *bool `json:"enable_pipeline2,omitempty"`

	// This flag enables dynamic client registration.
	EnableDynamicClientRegistration *bool `json:"enable_dynamic_client_registration,omitempty"`

	// If enabled, All your email links and urls will use your configured custom
	// domain. If no custom domain is found the email operation will fail.
	EnableCustomDomainInEmails *bool `json:"enable_custom_domain_in_emails,omitempty"`

	// If enabled, users will not be prompted to confirm log in before SSO
	// redirection.
	EnableSSO *bool `json:"enable_sso,omitempty"`

	// Whether the `EnableSSO` setting can be changed.
	AllowChangingEnableSSO *bool `json:"allow_changing_enable_sso,omitempty"`

	// If enabled, activate the new look and feel for Universal Login
	UniversalLogin *bool `json:"universal_login,omitempty"`

	// If enabled, the legacy Logs Search Engine V2 will be enabled for your
	// account.
	//
	// Turn it off to opt-in for the latest Logs Search Engine V3.
	EnableLegacyLogsSearchV2 *bool `json:"enable_legacy_logs_search_v2,omitempty"`

	// If enabled, additional HTTP security headers will not be included in the
	// response to prevent embedding of the Universal Login prompts in an
	// IFRAME.
	DisableClickjackProtectionHeaders *bool `json:"disable_clickjack_protection_headers,omitempty"`

	// If enabled, this will use a generic response in the public signup API
	// which will prevent users from being able to find out if an e-mail address
	// or username has previously registered.
	EnablePublicSignupUserExistsError *bool `json:"enable_public_signup_user_exists_error,omitempty"`

	// If enabled, this will use the scope description when generating a consent
	// prompt. Otherwise, the scope name is used.
	UseScopeDescriptionsForConsent *bool `json:"use_scope_descriptions_for_consent,omitempty"`

	// Whether the legacy delegation endpoint will be enabled for your account (true) or not available (false).
	AllowLegacyDelegationGrantTypes *bool `json:"allow_legacy_delegation_grant_types,omitempty"`

	// Whether the legacy `auth/ro` endpoint (used with resource owner password and passwordless features) will be enabled for your account (true) or not available (false).
	AllowLegacyROGrantTypes *bool `json:"allow_legacy_ro_grant_types,omitempty"`

	// If enabled, customers can use Tokeninfo Endpoint, otherwise they can not use it.
	AllowLegacyTokenInfoEndpoint *bool `json:"allow_legacy_tokeninfo_endpoint,omitempty"`

	// Whether ID tokens and the userinfo endpoint includes a complete user profile (true) or only OpenID Connect claims (false).
	EnableLegacyProfile *bool `json:"enable_legacy_profile,omitempty"`

	// Whether ID tokens can be used to authorize some types of requests to API v2 (true) not not (false).
	EnableIDTokenAPI2 *bool `json:"enable_idtoken_api2,omitempty"`

	// Do not Publish Enterprise Connections Information with IdP domains on the lock configuration file.
	NoDisclosureEnterpriseConnections *bool `json:"no_disclose_enterprise_connections,omitempty"`

	// If true, SMS phone numbers will not be obfuscated in Management API GET calls.
	DisableManagementAPISMSObfuscation *bool `json:"disable_management_api_sms_obfuscation,omitempty"`

	// If enabled, users will be presented with an email verification prompt during their first login when using Azure AD or ADFS connections
	EnableADFSWAADEmailVerification *bool `json:"enable_adfs_waad_email_verification,omitempty"`

	// Delete underlying grant when a Refresh Token is revoked via the Authentication API.
	RevokeRefreshTokenGrant *bool `json:"revoke_refresh_token_grant,omitempty"`

	// Enables beta access to log streaming changes
	DashboardLogStreams *bool `json:"dashboard_log_streams_next,omitempty"`

	// Enables new insights activity page view
	DashboardInsightsView *bool `json:"dashboard_insights_view,omitempty"`

	// Disables SAML fields map fix for bad mappings with repeated attributes
	DisableFieldsMapFix *bool `json:"disable_fields_map_fix,omitempty"`
}

TenantFlags holds information on flag toggles.

func (*TenantFlags) GetAllowChangingEnableSSO

func (t *TenantFlags) GetAllowChangingEnableSSO() bool

GetAllowChangingEnableSSO returns the AllowChangingEnableSSO field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetAllowLegacyDelegationGrantTypes added in v0.8.0

func (t *TenantFlags) GetAllowLegacyDelegationGrantTypes() bool

GetAllowLegacyDelegationGrantTypes returns the AllowLegacyDelegationGrantTypes field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetAllowLegacyROGrantTypes added in v0.8.0

func (t *TenantFlags) GetAllowLegacyROGrantTypes() bool

GetAllowLegacyROGrantTypes returns the AllowLegacyROGrantTypes field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetAllowLegacyTokenInfoEndpoint added in v0.8.0

func (t *TenantFlags) GetAllowLegacyTokenInfoEndpoint() bool

GetAllowLegacyTokenInfoEndpoint returns the AllowLegacyTokenInfoEndpoint field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetDashboardInsightsView added in v0.8.0

func (t *TenantFlags) GetDashboardInsightsView() bool

GetDashboardInsightsView returns the DashboardInsightsView field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetDashboardLogStreams added in v0.8.0

func (t *TenantFlags) GetDashboardLogStreams() bool

GetDashboardLogStreams returns the DashboardLogStreams field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetDisableClickjackProtectionHeaders

func (t *TenantFlags) GetDisableClickjackProtectionHeaders() bool

GetDisableClickjackProtectionHeaders returns the DisableClickjackProtectionHeaders field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetDisableFieldsMapFix added in v0.8.0

func (t *TenantFlags) GetDisableFieldsMapFix() bool

GetDisableFieldsMapFix returns the DisableFieldsMapFix field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetDisableImpersonation

func (t *TenantFlags) GetDisableImpersonation() bool

GetDisableImpersonation returns the DisableImpersonation field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetDisableManagementAPISMSObfuscation added in v0.8.0

func (t *TenantFlags) GetDisableManagementAPISMSObfuscation() bool

GetDisableManagementAPISMSObfuscation returns the DisableManagementAPISMSObfuscation field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableADFSWAADEmailVerification added in v0.8.0

func (t *TenantFlags) GetEnableADFSWAADEmailVerification() bool

GetEnableADFSWAADEmailVerification returns the EnableADFSWAADEmailVerification field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableAPIsSection

func (t *TenantFlags) GetEnableAPIsSection() bool

GetEnableAPIsSection returns the EnableAPIsSection field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableClientConnections

func (t *TenantFlags) GetEnableClientConnections() bool

GetEnableClientConnections returns the EnableClientConnections field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableCustomDomainInEmails

func (t *TenantFlags) GetEnableCustomDomainInEmails() bool

GetEnableCustomDomainInEmails returns the EnableCustomDomainInEmails field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableDynamicClientRegistration

func (t *TenantFlags) GetEnableDynamicClientRegistration() bool

GetEnableDynamicClientRegistration returns the EnableDynamicClientRegistration field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableIDTokenAPI2 added in v0.8.0

func (t *TenantFlags) GetEnableIDTokenAPI2() bool

GetEnableIDTokenAPI2 returns the EnableIDTokenAPI2 field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableLegacyLogsSearchV2

func (t *TenantFlags) GetEnableLegacyLogsSearchV2() bool

GetEnableLegacyLogsSearchV2 returns the EnableLegacyLogsSearchV2 field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableLegacyProfile added in v0.8.0

func (t *TenantFlags) GetEnableLegacyProfile() bool

GetEnableLegacyProfile returns the EnableLegacyProfile field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnablePipeline2

func (t *TenantFlags) GetEnablePipeline2() bool

GetEnablePipeline2 returns the EnablePipeline2 field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnablePublicSignupUserExistsError

func (t *TenantFlags) GetEnablePublicSignupUserExistsError() bool

GetEnablePublicSignupUserExistsError returns the EnablePublicSignupUserExistsError field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetEnableSSO

func (t *TenantFlags) GetEnableSSO() bool

GetEnableSSO returns the EnableSSO field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetNoDisclosureEnterpriseConnections added in v0.8.0

func (t *TenantFlags) GetNoDisclosureEnterpriseConnections() bool

GetNoDisclosureEnterpriseConnections returns the NoDisclosureEnterpriseConnections field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetRevokeRefreshTokenGrant added in v0.8.0

func (t *TenantFlags) GetRevokeRefreshTokenGrant() bool

GetRevokeRefreshTokenGrant returns the RevokeRefreshTokenGrant field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetUniversalLogin

func (t *TenantFlags) GetUniversalLogin() bool

GetUniversalLogin returns the UniversalLogin field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetUseScopeDescriptionsForConsent

func (t *TenantFlags) GetUseScopeDescriptionsForConsent() bool

GetUseScopeDescriptionsForConsent returns the UseScopeDescriptionsForConsent field if it's non-nil, zero value otherwise.

func (*TenantFlags) String

func (t *TenantFlags) String() string

String returns a string representation of TenantFlags.

type TenantGuardianMFAPage

type TenantGuardianMFAPage struct {
	// True to use the custom html for Guardian page, false otherwise.
	Enabled *bool `json:"enabled,omitempty"`
	// Replace default Guardian page with a custom HTML (Liquid syntax is
	// supported).
	HTML *string `json:"html,omitempty"`
}

TenantGuardianMFAPage holds settings for guardian mfa page.

func (*TenantGuardianMFAPage) GetEnabled

func (t *TenantGuardianMFAPage) GetEnabled() bool

GetEnabled returns the Enabled field if it's non-nil, zero value otherwise.

func (*TenantGuardianMFAPage) GetHTML

func (t *TenantGuardianMFAPage) GetHTML() string

GetHTML returns the HTML field if it's non-nil, zero value otherwise.

func (*TenantGuardianMFAPage) String

func (t *TenantGuardianMFAPage) String() string

String returns a string representation of TenantGuardianMFAPage.

type TenantManager

type TenantManager struct {
	*Management
}

TenantManager manages Auth0 Tenant resources.

func (*TenantManager) Read

func (m *TenantManager) Read(opts ...RequestOption) (t *Tenant, err error)

Read tenant settings. A list of fields to include or exclude may also be specified.

See: https://auth0.com/docs/api/management/v2#!/Tenants/get_settings

func (*TenantManager) Update

func (m *TenantManager) Update(t *Tenant, opts ...RequestOption) (err error)

Update settings for a tenant.

See: https://auth0.com/docs/api/management/v2#!/Tenants/patch_settings

type TenantSessionCookie added in v0.9.0

type TenantSessionCookie struct {
	Mode *string `json:"mode,omitempty"`
}

TenantSessionCookie manages behavior of the tenant's session cookie, accepts either 'persistent' or 'non-persistent'.

func (*TenantSessionCookie) GetMode added in v0.9.0

func (t *TenantSessionCookie) GetMode() string

GetMode returns the Mode field if it's non-nil, zero value otherwise.

func (*TenantSessionCookie) String added in v0.9.0

func (t *TenantSessionCookie) String() string

String returns a string representation of TenantSessionCookie.

type TenantUniversalLogin

type TenantUniversalLogin struct {
	Colors *TenantUniversalLoginColors `json:"colors,omitempty"`
}

TenantUniversalLogin holds universal login settings.

func (*TenantUniversalLogin) GetColors

GetColors returns the Colors field.

func (*TenantUniversalLogin) String

func (t *TenantUniversalLogin) String() string

String returns a string representation of TenantUniversalLogin.

type TenantUniversalLoginColors

type TenantUniversalLoginColors struct {
	// Primary button background color
	Primary *string `json:"primary,omitempty"`

	// Page background color.
	//
	// Only one of PageBackground and PageBackgroundGradient should be set. If
	// both fields are set, PageBackground takes priority.
	PageBackground *string `json:"-"`

	// Page background gradient.
	//
	// Only one of PageBackground and PageBackgroundGradient should be set. If
	// both fields are set, PageBackground takes priority.
	PageBackgroundGradient *BrandingPageBackgroundGradient `json:"-"`
}

TenantUniversalLoginColors holds universal login color settings.

func (*TenantUniversalLoginColors) GetPageBackground

func (t *TenantUniversalLoginColors) GetPageBackground() string

GetPageBackground returns the PageBackground field if it's non-nil, zero value otherwise.

func (*TenantUniversalLoginColors) GetPageBackgroundGradient

func (t *TenantUniversalLoginColors) GetPageBackgroundGradient() *BrandingPageBackgroundGradient

GetPageBackgroundGradient returns the PageBackgroundGradient field.

func (*TenantUniversalLoginColors) GetPrimary

func (t *TenantUniversalLoginColors) GetPrimary() string

GetPrimary returns the Primary field if it's non-nil, zero value otherwise.

func (*TenantUniversalLoginColors) MarshalJSON

func (c *TenantUniversalLoginColors) MarshalJSON() ([]byte, error)

MarshalJSON is a custom serializer for the TenantUniversalLoginColors type.

func (*TenantUniversalLoginColors) String

func (t *TenantUniversalLoginColors) String() string

String returns a string representation of TenantUniversalLoginColors.

func (*TenantUniversalLoginColors) UnmarshalJSON

func (c *TenantUniversalLoginColors) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

It is required to handle the json field page_background, which can either be a hex color string, or an object describing a gradient.

type Ticket

type Ticket struct {
	// The user will be redirected to this endpoint once the ticket is used.
	ResultURL *string `json:"result_url,omitempty"`

	// The UserID for which the ticket is to be created.
	UserID *string `json:"user_id,omitempty"`

	// The ticket's lifetime in seconds starting from the moment of creation.
	// After expiration the ticket can not be used to verify the users' email.
	// If not specified or if you send 0 the Auth0 default lifetime will be
	// applied.
	TTLSec *int `json:"ttl_sec,omitempty"`

	// ID of the client. If provided for tenants using New Universal Login experience,
	// the user will be prompted to redirect to the default login route of the
	// corresponding application once the ticket is used.
	//
	// Conflicts with: ResultURL
	ClientID *string `json:"client_id,omitempty"`

	// The connection that provides the identity for which the password is to be
	// changed. If sending this parameter, the email is also required and the
	// UserID is invalid.
	//
	// Requires: Email
	// Conflicts with: UserID
	ConnectionID *string `json:"connection_id,omitempty"`

	// The user's email.
	//
	// Requires: ConnectionID
	// Conflicts with: UserID
	Email *string `json:"email,omitempty"`

	// The URL that represents the ticket.
	Ticket *string `json:"ticket,omitempty"`

	// Whether to set the email_verified attribute to true (true) or whether it
	// should not be updated.
	MarkEmailAsVerified *bool `json:"mark_email_as_verified,omitempty"`

	// Whether to include the email address as part of the returnUrl in
	// the reset_email (true), or not (false - default).
	IncludeEmailInRedirect *bool `json:"includeEmailInRedirect,omitempty"`
}

Ticket is used for a users' email verification or password change.

func (*Ticket) GetClientID

func (t *Ticket) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*Ticket) GetConnectionID

func (t *Ticket) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*Ticket) GetEmail

func (t *Ticket) GetEmail() string

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*Ticket) GetIncludeEmailInRedirect

func (t *Ticket) GetIncludeEmailInRedirect() bool

GetIncludeEmailInRedirect returns the IncludeEmailInRedirect field if it's non-nil, zero value otherwise.

func (*Ticket) GetMarkEmailAsVerified

func (t *Ticket) GetMarkEmailAsVerified() bool

GetMarkEmailAsVerified returns the MarkEmailAsVerified field if it's non-nil, zero value otherwise.

func (*Ticket) GetResultURL

func (t *Ticket) GetResultURL() string

GetResultURL returns the ResultURL field if it's non-nil, zero value otherwise.

func (*Ticket) GetTTLSec

func (t *Ticket) GetTTLSec() int

GetTTLSec returns the TTLSec field if it's non-nil, zero value otherwise.

func (*Ticket) GetTicket

func (t *Ticket) GetTicket() string

GetTicket returns the Ticket field if it's non-nil, zero value otherwise.

func (*Ticket) GetUserID

func (t *Ticket) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*Ticket) String

func (t *Ticket) String() string

String returns a string representation of Ticket.

type TicketManager

type TicketManager struct {
	*Management
}

TicketManager manages Auth0 Ticket resources.

func (*TicketManager) ChangePassword

func (m *TicketManager) ChangePassword(t *Ticket, opts ...RequestOption) error

ChangePassword creates a password change ticket for a user.

See: https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change

func (*TicketManager) VerifyEmail

func (m *TicketManager) VerifyEmail(t *Ticket, opts ...RequestOption) error

VerifyEmail creates a ticket to verify a user's email address.

See: https://auth0.com/docs/api/management/v2#!/Tickets/post_email_verification

type User

type User struct {
	// The users' identifier.
	ID *string `json:"user_id,omitempty"`

	// The connection the user belongs to.
	Connection *string `json:"connection,omitempty"`

	// The users' email.
	Email *string `json:"email,omitempty"`

	// The users' name.
	Name *string `json:"name,omitempty"`

	// The users' given name.
	GivenName *string `json:"given_name,omitempty"`

	// The users' family name.
	FamilyName *string `json:"family_name,omitempty"`

	// The users' username. Only valid if the connection requires a username.
	Username *string `json:"username,omitempty"`

	// The users' nickname.
	Nickname *string `json:"nickname,omitempty"`

	// The screen name, handle, or alias that this user identifies themselves with.
	ScreenName *string `json:"screen_name,omitempty"`

	// The user-defined UTF-8 string describing their account.
	Description *string `json:"description,omitempty"`

	// The user-defined location for this account’s profile.
	Location *string `json:"location,omitempty"`

	// The users' password (mandatory for non SMS connections)
	Password *string `json:"password,omitempty"`

	// The users' phone number (following the E.164 recommendation).
	// Only valid for users to be added to SMS connections.
	PhoneNumber *string `json:"phone_number,omitempty"`

	// The time the user was created.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// The last time the user was updated.
	UpdatedAt *time.Time `json:"updated_at,omitempty"`

	// The last time the user has logged in.
	LastLogin *time.Time `json:"last_login,omitempty"`

	// UserMetadata holds data that the user has read/write access to.
	// For example color_preference, blog_url, etc.
	UserMetadata *map[string]interface{} `json:"user_metadata,omitempty"`

	// Identities is a list of user identities for when accounts are linked.
	Identities []*UserIdentity `json:"identities,omitempty"`

	// True if the user's email is verified, false otherwise. If it is true then
	// the user will not receive a verification email, unless verify_email: true
	// was specified.
	EmailVerified *bool `json:"-"`

	// If true, the user will receive a verification email after creation, even
	// if created with email_verified set to true. If false, the user will not
	// receive a verification email, even if created with email_verified set to
	// false. If unspecified, defaults to the behavior determined by the value
	// of email_verified.
	VerifyEmail *bool `json:"verify_email,omitempty"`

	// True if the user's phone number is verified, false otherwise. When the
	// user is added to an SMS connection, they will not receive a verification
	// SMS if this is true.
	PhoneVerified *bool `json:"phone_verified,omitempty"`

	// AppMetadata holds data that the user has read-only access to.
	// For example roles, permissions, vip, etc.
	// NOTE: Roles added to AppMetadata are not integrated with Auth0 Role-Based Access Control (RBAC).
	// For RBAC, see the functions User.Roles, User.AssignRoles, and User.RemoveRoles.
	AppMetadata *map[string]interface{} `json:"app_metadata,omitempty"`

	// The user's picture url.
	Picture *string `json:"picture,omitempty"`

	// A URL provided by the user in association with their profile.
	URL *string `json:"url,omitempty"`

	// True if the user is blocked from the application, false if the user is enabled.
	Blocked *bool `json:"blocked,omitempty"`

	// Last IP address from which this user logged in. Read only, cannot be modified.
	LastIP *string `json:"last_ip,omitempty"`

	// Total number of logins this user has performed. Read only, cannot be modified.
	LoginsCount *int64 `json:"logins_count,omitempty"`

	// List of multi-factor authentication providers with which this user has enrolled.
	Multifactor *[]string `json:"multifactor,omitempty"`

	// Auth0 client ID. Only valid when updating email address.
	ClientID *string `json:"client_id,omitempty"`
}

User represents an Auth0 user resource.

See: https://auth0.com/docs/users

func (*User) GetBlocked

func (u *User) GetBlocked() bool

GetBlocked returns the Blocked field if it's non-nil, zero value otherwise.

func (*User) GetClientID added in v0.9.3

func (u *User) GetClientID() string

GetClientID returns the ClientID field if it's non-nil, zero value otherwise.

func (*User) GetConnection

func (u *User) GetConnection() string

GetConnection returns the Connection field if it's non-nil, zero value otherwise.

func (*User) GetCreatedAt

func (u *User) GetCreatedAt() time.Time

GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.

func (*User) GetDescription

func (u *User) GetDescription() string

GetDescription returns the Description field if it's non-nil, zero value otherwise.

func (*User) GetEmail

func (u *User) GetEmail() string

GetEmail returns the Email field if it's non-nil, zero value otherwise.

func (*User) GetEmailVerified

func (u *User) GetEmailVerified() bool

GetEmailVerified returns the EmailVerified field if it's non-nil, zero value otherwise.

func (*User) GetFamilyName

func (u *User) GetFamilyName() string

GetFamilyName returns the FamilyName field if it's non-nil, zero value otherwise.

func (*User) GetGivenName

func (u *User) GetGivenName() string

GetGivenName returns the GivenName field if it's non-nil, zero value otherwise.

func (*User) GetID

func (u *User) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*User) GetLastIP

func (u *User) GetLastIP() string

GetLastIP returns the LastIP field if it's non-nil, zero value otherwise.

func (*User) GetLastLogin

func (u *User) GetLastLogin() time.Time

GetLastLogin returns the LastLogin field if it's non-nil, zero value otherwise.

func (*User) GetLocation

func (u *User) GetLocation() string

GetLocation returns the Location field if it's non-nil, zero value otherwise.

func (*User) GetLoginsCount

func (u *User) GetLoginsCount() int64

GetLoginsCount returns the LoginsCount field if it's non-nil, zero value otherwise.

func (*User) GetMultifactor added in v0.9.3

func (u *User) GetMultifactor() []string

GetMultifactor returns the Multifactor field if it's non-nil, zero value otherwise.

func (*User) GetName

func (u *User) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*User) GetNickname

func (u *User) GetNickname() string

GetNickname returns the Nickname field if it's non-nil, zero value otherwise.

func (*User) GetPassword

func (u *User) GetPassword() string

GetPassword returns the Password field if it's non-nil, zero value otherwise.

func (*User) GetPhoneNumber

func (u *User) GetPhoneNumber() string

GetPhoneNumber returns the PhoneNumber field if it's non-nil, zero value otherwise.

func (*User) GetPhoneVerified

func (u *User) GetPhoneVerified() bool

GetPhoneVerified returns the PhoneVerified field if it's non-nil, zero value otherwise.

func (*User) GetPicture

func (u *User) GetPicture() string

GetPicture returns the Picture field if it's non-nil, zero value otherwise.

func (*User) GetScreenName

func (u *User) GetScreenName() string

GetScreenName returns the ScreenName field if it's non-nil, zero value otherwise.

func (*User) GetURL

func (u *User) GetURL() string

GetURL returns the URL field if it's non-nil, zero value otherwise.

func (*User) GetUpdatedAt

func (u *User) GetUpdatedAt() time.Time

GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.

func (*User) GetUsername

func (u *User) GetUsername() string

GetUsername returns the Username field if it's non-nil, zero value otherwise.

func (*User) GetVerifyEmail

func (u *User) GetVerifyEmail() bool

GetVerifyEmail returns the VerifyEmail field if it's non-nil, zero value otherwise.

func (*User) MarshalJSON

func (u *User) MarshalJSON() ([]byte, error)

MarshalJSON is a custom serializer for the User type.

func (*User) String

func (u *User) String() string

String returns a string representation of User.

func (*User) UnmarshalJSON

func (u *User) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom deserializer for the User type.

We have to use a custom one due to possible inconsistencies in value types.

type UserBlock

type UserBlock struct {
	Identifier *string `json:"identifier,omitempty"`
	IP         *string `json:"ip,omitempty"`
}

UserBlock keeps track of a blocked IP for the login identifier associated with a User.

func (*UserBlock) GetIP

func (u *UserBlock) GetIP() string

GetIP returns the IP field if it's non-nil, zero value otherwise.

func (*UserBlock) GetIdentifier

func (u *UserBlock) GetIdentifier() string

GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.

func (*UserBlock) String

func (u *UserBlock) String() string

String returns a string representation of UserBlock.

type UserEnrollment

type UserEnrollment struct {
	// Authentication method for this enrollment. Can be `authentication`, `guardian`, or `sms`.
	AuthMethod *string `json:"auth_method,omitempty"`

	// Start date and time of this enrollment.
	EnrolledAt *time.Time `json:"enrolled_at,omitempty"`

	// ID of this enrollment.
	ID *string `json:"id,omitempty"`

	// Device identifier (usually phone identifier) of this enrollment.
	Identifier *string `json:"identifier,omitempty"`

	// Last authentication date and time of this enrollment.
	LastAuth *time.Time `json:"last_auth,omitempty"`

	// Name of enrollment (usually phone number).
	Name *string `json:"name,omitempty"`

	// Phone number for this enrollment.
	PhoneNumber *string `json:"phone_number,omitempty"`

	// Status of this enrollment. Can be `pending` or `confirmed`.
	Status *string `json:"status,omitempty"`

	// Type of enrollment.
	Type *string `json:"type,omitempty"`
}

UserEnrollment contains information about the Guardian enrollments for the user.

func (*UserEnrollment) GetAuthMethod

func (u *UserEnrollment) GetAuthMethod() string

GetAuthMethod returns the AuthMethod field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetEnrolledAt

func (u *UserEnrollment) GetEnrolledAt() time.Time

GetEnrolledAt returns the EnrolledAt field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetID

func (u *UserEnrollment) GetID() string

GetID returns the ID field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetIdentifier

func (u *UserEnrollment) GetIdentifier() string

GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetLastAuth

func (u *UserEnrollment) GetLastAuth() time.Time

GetLastAuth returns the LastAuth field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetName

func (u *UserEnrollment) GetName() string

GetName returns the Name field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetPhoneNumber

func (u *UserEnrollment) GetPhoneNumber() string

GetPhoneNumber returns the PhoneNumber field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetStatus

func (u *UserEnrollment) GetStatus() string

GetStatus returns the Status field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetType

func (u *UserEnrollment) GetType() string

GetType returns the Type field if it's non-nil, zero value otherwise.

func (*UserEnrollment) String

func (u *UserEnrollment) String() string

String returns a string representation of UserEnrollment.

type UserIdentity

type UserIdentity struct {
	Connection        *string                 `json:"connection,omitempty"`
	UserID            *string                 `json:"-"`
	Provider          *string                 `json:"provider,omitempty"`
	IsSocial          *bool                   `json:"isSocial,omitempty"`
	AccessToken       *string                 `json:"access_token,omitempty"`
	AccessTokenSecret *string                 `json:"access_token_secret,omitempty"`
	RefreshToken      *string                 `json:"refresh_token,omitempty"`
	ProfileData       *map[string]interface{} `json:"profileData,omitempty"`
}

UserIdentity holds values that validate a User's identity.

func (*UserIdentity) GetAccessToken

func (u *UserIdentity) GetAccessToken() string

GetAccessToken returns the AccessToken field if it's non-nil, zero value otherwise.

func (*UserIdentity) GetAccessTokenSecret

func (u *UserIdentity) GetAccessTokenSecret() string

GetAccessTokenSecret returns the AccessTokenSecret field if it's non-nil, zero value otherwise.

func (*UserIdentity) GetConnection

func (u *UserIdentity) GetConnection() string

GetConnection returns the Connection field if it's non-nil, zero value otherwise.

func (*UserIdentity) GetIsSocial

func (u *UserIdentity) GetIsSocial() bool

GetIsSocial returns the IsSocial field if it's non-nil, zero value otherwise.

func (*UserIdentity) GetProvider

func (u *UserIdentity) GetProvider() string

GetProvider returns the Provider field if it's non-nil, zero value otherwise.

func (*UserIdentity) GetRefreshToken

func (u *UserIdentity) GetRefreshToken() string

GetRefreshToken returns the RefreshToken field if it's non-nil, zero value otherwise.

func (*UserIdentity) GetUserID

func (u *UserIdentity) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*UserIdentity) MarshalJSON

func (i *UserIdentity) MarshalJSON() ([]byte, error)

MarshalJSON is a custom serializer for the UserIdentity type.

func (*UserIdentity) String

func (u *UserIdentity) String() string

String returns a string representation of UserIdentity.

func (*UserIdentity) UnmarshalJSON

func (i *UserIdentity) UnmarshalJSON(b []byte) error

UnmarshalJSON is a custom deserializer for the UserIdentity type.

We have to use a custom one due to a bug in the Auth0 Management API which might return a number for `user_id` instead of a string.

See https://community.auth0.com/t/users-user-id-returns-inconsistent-type-for-identities-user-id/39236

type UserIdentityLink struct {
	// Connection id of the secondary user account being linked when more than one auth0 database provider exists.
	ConnectionID *string `json:"connection_id,omitempty"`

	// Secondary account user id.
	UserID *string `json:"user_id,omitempty"`

	// Identity provider of the secondary user account being linked.
	Provider *string `json:"provider,omitempty"`

	// LinkWith requires the authenticated primary account's JWT in the Authorization header.
	// Must be a JWT for the secondary account being linked. If sending this parameter,
	// provider, user_id, and connection_id must not be sent.
	LinkWith *string `json:"link_with,omitempty"`
}

UserIdentityLink contains the data needed for linking an identity to a given user.

func (*UserIdentityLink) GetConnectionID

func (u *UserIdentityLink) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*UserIdentityLink) GetLinkWith

func (u *UserIdentityLink) GetLinkWith() string

GetLinkWith returns the LinkWith field if it's non-nil, zero value otherwise.

func (*UserIdentityLink) GetProvider

func (u *UserIdentityLink) GetProvider() string

GetProvider returns the Provider field if it's non-nil, zero value otherwise.

func (*UserIdentityLink) GetUserID

func (u *UserIdentityLink) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*UserIdentityLink) String

func (u *UserIdentityLink) String() string

String returns a string representation of UserIdentityLink.

type UserList

type UserList struct {
	List
	Users []*User `json:"users"`
}

UserList is an envelope struct which is used when calling List() or Search() methods.

It holds metadata such as the total result count, starting offset and limit.

func (*UserList) String

func (u *UserList) String() string

String returns a string representation of UserList.

type UserManager

type UserManager struct {
	*Management
}

UserManager manages Auth0 User resources.

func (*UserManager) AssignPermissions

func (m *UserManager) AssignPermissions(id string, permissions []*Permission, opts ...RequestOption) error

AssignPermissions assigns permissions to the user.

See: https://auth0.com/docs/api/management/v2#!/Users/post_permissions

func (*UserManager) AssignRoles

func (m *UserManager) AssignRoles(id string, roles []*Role, opts ...RequestOption) error

AssignRoles assigns roles to a user.

See: https://auth0.com/docs/api/management/v2#!/Users/post_user_roles

Example
package main

import (
	"os"

	"github.com/auth0/go-auth0/management"
)

var api *management.Management

var (
	user  = &management.User{}
	admin = &management.Role{}
)

func main() {
	err := api.User.AssignRoles(user.GetID(), []*management.Role{admin})
	if err != nil {
		// handle err
		return
	}
	defer api.User.RemoveRoles(user.GetID(), []*management.Role{admin})
}
Output:

func (*UserManager) Blocks

func (m *UserManager) Blocks(id string, opts ...RequestOption) ([]*UserBlock, error)

Blocks retrieves a list of blocked IP addresses of a particular user using the user ID.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks_by_id

func (*UserManager) BlocksByIdentifier

func (m *UserManager) BlocksByIdentifier(identifier string, opts ...RequestOption) ([]*UserBlock, error)

BlocksByIdentifier retrieves a list of blocked IP addresses of a particular user using any of the user identifiers: username, phone number or email.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks

func (*UserManager) Create

func (m *UserManager) Create(u *User, opts ...RequestOption) error

Create a new user. It works only for database and passwordless connections.

The samples on the right show you every attribute that could be used. The attribute connection is always mandatory but depending on the type of connection you are using there could be others too. For instance, database connections require `email` and `password`.

See: https://auth0.com/docs/api/management/v2#!/Users/post_users

Example
u := &management.User{
	Connection: auth0.String("Username-Password-Authentication"),
	Email:      auth0.String("smith@example.com"),
	Username:   auth0.String("smith"),
	Password:   auth0.String("F4e3DA1a6cDD"),
}

err := api.User.Create(u)
if err != nil {
	// handle err
	return
}
defer api.User.Delete(u.GetID())

_ = u.GetID()
_ = u.GetCreatedAt()
Output:

func (*UserManager) Delete

func (m *UserManager) Delete(id string, opts ...RequestOption) (err error)

Delete a single user based on its id.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_users_by_id

func (*UserManager) Enrollments

func (m *UserManager) Enrollments(id string, opts ...RequestOption) (enrolls []*UserEnrollment, err error)

Enrollments retrieves all Guardian enrollments for a user.

See: https://auth0.com/docs/api/management/v2#!/Users/get_enrollments

func (*UserManager) InvalidateRememberBrowser

func (m *UserManager) InvalidateRememberBrowser(id string, opts ...RequestOption) error

InvalidateRememberBrowser invalidates all remembered browsers across all authentication factors for a user.

See: https://auth0.com/docs/api/management/v2#!/Users/post_invalidate_remember_browser

func (m *UserManager) Link(id string, il *UserIdentityLink, opts ...RequestOption) (uIDs []UserIdentity, err error)

Link links two user accounts together forming a primary and secondary relationship.

See: https://auth0.com/docs/api/management/v2#!/Users/post_identities

func (*UserManager) List

func (m *UserManager) List(opts ...RequestOption) (ul *UserList, err error)

List all users. This method forces the `include_totals` option.

See: https://auth0.com/docs/api/management/v2#!/Users/get_users

Example
package main

import (
	"os"

	"github.com/auth0/go-auth0/management"
)

var (
	domain = os.Getenv("AUTH0_DOMAIN")
	id     = os.Getenv("AUTH0_CLIENT_ID")
	secret = os.Getenv("AUTH0_CLIENT_SECRET")

	api *management.Management
)

func init() {
	var err error
	api, err = management.New(domain, management.WithClientCredentials(id, secret))
	if err != nil {
		panic(err)
	}
}

func main() {
	q := management.Query(`name:"jane smith"`)
	l, err := api.User.List(q)
	if err != nil {
		// handle err
		return
	}
	_ = l.Users // users matching name "jane smith"
}
Output:

Example (Pagination)
package main

import (
	"os"

	"github.com/auth0/go-auth0/management"
)

var api *management.Management

func main() {
	var page int
	for {
		l, err := api.User.List(
			management.Query(`logins_count:{100 TO *]`),
			management.Page(page))
		if err != nil {
			// handle err
			return
		}
		for _, u := range l.Users {
			u.GetID() // do something with each user
		}
		if !l.HasNext() {
			break
		}
		page++
	}
}
Output:

func (*UserManager) ListByEmail

func (m *UserManager) ListByEmail(email string, opts ...RequestOption) (us []*User, err error)

ListByEmail retrieves all users matching a given email.

If Auth0 is the identify provider (idP), the email address associated with a user is saved in lower case, regardless of how you initially provided it. For example, if you register a user as JohnSmith@example.com, Auth0 saves the user's email as johnsmith@example.com.

In cases where Auth0 is not the idP, the `email` is stored based on the rules of idP, so make sure the search is made using the correct capitalization.

When using this endpoint, make sure that you are searching for users via email addresses using the correct case.

See: https://auth0.com/docs/api/management/v2#!/Users_By_Email/get_users_by_email

func (*UserManager) Organizations

func (m *UserManager) Organizations(id string, opts ...RequestOption) (p *OrganizationList, err error)

Organizations lists user's organizations.

See: https://auth0.com/docs/api/management/v2#!/Users/get_organizations

func (*UserManager) Permissions

func (m *UserManager) Permissions(id string, opts ...RequestOption) (p *PermissionList, err error)

Permissions lists the permissions associated to the user.

See: https://auth0.com/docs/api/management/v2#!/Users/get_permissions

func (*UserManager) Read

func (m *UserManager) Read(id string, opts ...RequestOption) (u *User, err error)

Read user details for a given user_id.

See: https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id

func (*UserManager) RegenerateRecoveryCode

func (m *UserManager) RegenerateRecoveryCode(id string, opts ...RequestOption) (*UserRecoveryCode, error)

RegenerateRecoveryCode removes the current multi-factor authentication recovery code and generate a new one.

See: https://auth0.com/docs/api/management/v2#!/Users/post_recovery_code_regeneration

func (*UserManager) RemovePermissions

func (m *UserManager) RemovePermissions(id string, permissions []*Permission, opts ...RequestOption) error

RemovePermissions removes any permissions associated to a user.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_permissions

func (*UserManager) RemoveRoles

func (m *UserManager) RemoveRoles(id string, roles []*Role, opts ...RequestOption) error

RemoveRoles removes any roles associated to a user.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_user_roles

func (*UserManager) Roles

func (m *UserManager) Roles(id string, opts ...RequestOption) (r *RoleList, err error)

Roles lists all roles associated with a user.

See: https://auth0.com/docs/api/management/v2#!/Users/get_user_roles

func (*UserManager) Search

func (m *UserManager) Search(opts ...RequestOption) (ul *UserList, err error)

Search is an alias for List.

func (*UserManager) Unblock

func (m *UserManager) Unblock(id string, opts ...RequestOption) error

Unblock a user that was blocked due to an excessive amount of incorrectly provided credentials using the user ID.

Note: This endpoint does not unblock users that were blocked by admins.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks_by_id

func (*UserManager) UnblockByIdentifier

func (m *UserManager) UnblockByIdentifier(identifier string, opts ...RequestOption) error

UnblockByIdentifier a user that was blocked due to an excessive amount of incorrectly provided credentials using any of the user identifiers: username, phone number or email.

Note: This endpoint does not unblock users that were blocked by admins.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/delete_user_blocks

func (m *UserManager) Unlink(id, provider, userID string, opts ...RequestOption) (uIDs []UserIdentity, err error)

Unlink unlinks an identity from a user making it a separate account again.

See: https://auth0.com/docs/api/management/v2#!/Users/delete_user_identity_by_user_id

func (*UserManager) Update

func (m *UserManager) Update(id string, u *User, opts ...RequestOption) (err error)

Update user.

The following attributes can be updated at the root level:

- `app_metadata` - `blocked` - `email` - `email_verified` - `family_name` - `given_name` - `name` - `nickname` - `password` - `phone_number` - `phone_verified` - `picture` - `username` - `user_metadata` - `verify_email`

See: https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id

type UserRecoveryCode

type UserRecoveryCode struct {
	RecoveryCode *string `json:"recovery_code,omitempty"`
}

UserRecoveryCode represents a User's multi-factor authentication recovery code.

func (*UserRecoveryCode) GetRecoveryCode

func (u *UserRecoveryCode) GetRecoveryCode() string

GetRecoveryCode returns the RecoveryCode field if it's non-nil, zero value otherwise.

func (*UserRecoveryCode) String

func (u *UserRecoveryCode) String() string

String returns a string representation of UserRecoveryCode.

Jump to

Keyboard shortcuts

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