management

package
v5.21.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 20 Imported by: 21

Documentation

Index

Examples

Constants

View Source
const (
	ActionTriggerPostLogin         string = "post-login"
	ActionTriggerClientCredentials string = "client-credentials"
)
View Source
const (
	ActionStatusPending  string = "pending"
	ActionStatusBuilding string = "building"
	ActionStatusPackaged string = "packaged"
	ActionStatusBuilt    string = "built"
	ActionStatusRetrying string = "retrying"
	ActionStatusFailed   string = "failed"
)
View Source
const (
	ActionBindingReferenceByName string = "action_name"
	ActionBindingReferenceById   string = "action_id"
)
View Source
const (
	ConnectionStrategyAuth0               = "auth0"
	ConnectionStrategyGoogleOAuth2        = "google-oauth2"
	ConnectionStrategyFacebook            = "facebook"
	ConnectionStrategyApple               = "apple"
	ConnectionStrategyLinkedin            = "linkedin"
	ConnectionStrategyGitHub              = "github"
	ConnectionStrategyWindowsLive         = "windowslive"
	ConnectionStrategySalesforce          = "salesforce"
	ConnectionStrategySalesforceCommunity = "salesforce-community"
	ConnectionStrategySalesforceSandbox   = "salesforce-sandbox"
	ConnectionStrategyEmail               = "email"
	ConnectionStrategySMS                 = "sms"
	ConnectionStrategyOIDC                = "oidc"
	ConnectionStrategyOAuth2              = "oauth2"
	ConnectionStrategyAD                  = "ad"
	ConnectionStrategyADFS                = "adfs"
	ConnectionStrategyAzureAD             = "waad"
	ConnectionStrategySAML                = "samlp"
	ConnectionStrategyGoogleApps          = "google-apps"
)
View Source
const (
	LogStreamTypeAmazonEventBridge = "eventbridge"
	LogStreamTypeAzureEventGrid    = "eventgrid"
	LogStreamTypeHTTP              = "http"
	LogStreamTypeDatadog           = "datadog"
	LogStreamTypeSplunk            = "splunk"
	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 added in v5.18.0

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"`
}

func (*Action) GetBuiltAt added in v5.18.0

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

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

func (*Action) GetCode added in v5.18.0

func (a *Action) GetCode() string

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

func (*Action) GetCreatedAt added in v5.18.0

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

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

func (*Action) GetDeployedVersion added in v5.18.0

func (a *Action) GetDeployedVersion() *ActionVersion

GetDeployedVersion returns the DeployedVersion field.

func (*Action) GetID added in v5.18.0

func (a *Action) GetID() string

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

func (*Action) GetName added in v5.18.0

func (a *Action) GetName() string

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

func (*Action) GetRuntime added in v5.21.0

func (a *Action) GetRuntime() string

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

func (*Action) GetStatus added in v5.18.0

func (a *Action) GetStatus() string

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

func (*Action) GetUpdatedAt added in v5.18.0

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

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

func (*Action) String added in v5.18.0

func (a *Action) String() string

String returns a string representation of Action.

type ActionBinding added in v5.18.0

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"`
}

func (*ActionBinding) GetAction added in v5.18.0

func (a *ActionBinding) GetAction() *Action

GetAction returns the Action field.

func (*ActionBinding) GetCreatedAt added in v5.18.0

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

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

func (*ActionBinding) GetDisplayName added in v5.18.0

func (a *ActionBinding) GetDisplayName() string

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

func (*ActionBinding) GetID added in v5.18.0

func (a *ActionBinding) GetID() string

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

func (*ActionBinding) GetRef added in v5.18.0

GetRef returns the Ref field.

func (*ActionBinding) GetTriggerID added in v5.18.0

func (a *ActionBinding) GetTriggerID() string

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

func (*ActionBinding) GetUpdatedAt added in v5.18.0

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

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

func (*ActionBinding) String added in v5.18.0

func (a *ActionBinding) String() string

String returns a string representation of ActionBinding.

type ActionBindingList added in v5.18.0

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

func (*ActionBindingList) String added in v5.18.0

func (a *ActionBindingList) String() string

String returns a string representation of ActionBindingList.

type ActionBindingReference added in v5.18.0

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

func (*ActionBindingReference) GetType added in v5.18.0

func (a *ActionBindingReference) GetType() string

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

func (*ActionBindingReference) GetValue added in v5.18.0

func (a *ActionBindingReference) GetValue() string

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

func (*ActionBindingReference) String added in v5.18.0

func (a *ActionBindingReference) String() string

String returns a string representation of ActionBindingReference.

type ActionDependency added in v5.18.0

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

func (*ActionDependency) GetName added in v5.18.0

func (a *ActionDependency) GetName() string

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

func (*ActionDependency) GetRegistryURL added in v5.18.0

func (a *ActionDependency) GetRegistryURL() string

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

func (*ActionDependency) GetVersion added in v5.18.0

func (a *ActionDependency) GetVersion() string

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

func (*ActionDependency) String added in v5.18.0

func (a *ActionDependency) String() string

String returns a string representation of ActionDependency.

type ActionExecution added in v5.18.0

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"`
}

func (*ActionExecution) GetCreatedAt added in v5.18.0

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

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

func (*ActionExecution) GetID added in v5.18.0

func (a *ActionExecution) GetID() string

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

func (*ActionExecution) GetStatus added in v5.18.0

func (a *ActionExecution) GetStatus() string

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

func (*ActionExecution) GetTriggerID added in v5.18.0

func (a *ActionExecution) GetTriggerID() string

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

func (*ActionExecution) GetUpdatedAt added in v5.18.0

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

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

func (*ActionExecution) String added in v5.18.0

func (a *ActionExecution) String() string

String returns a string representation of ActionExecution.

type ActionExecutionResult added in v5.18.0

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"`
}

func (*ActionExecutionResult) GetActionName added in v5.18.0

func (a *ActionExecutionResult) GetActionName() string

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

func (*ActionExecutionResult) GetEndedAt added in v5.18.0

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

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

func (*ActionExecutionResult) GetStartedAt added in v5.18.0

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

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

func (*ActionExecutionResult) String added in v5.18.0

func (a *ActionExecutionResult) String() string

String returns a string representation of ActionExecutionResult.

type ActionList added in v5.18.0

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

func (*ActionList) String added in v5.18.0

func (a *ActionList) String() string

String returns a string representation of ActionList.

type ActionManager added in v5.18.0

type ActionManager struct {
	*Management
}

func (*ActionManager) Bindings added in v5.21.0

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 added in v5.18.0

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 added in v5.18.0

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 added in v5.18.0

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 added in v5.18.0

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 added in v5.21.0

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 added in v5.18.0

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) ListBindings deprecated added in v5.18.0

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

ListBindings lists the bindings of a trigger.

Deprecated: use Bindings() instead.

func (*ActionManager) ListTriggers deprecated added in v5.18.0

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

ListTriggers lists the available triggers.

Deprecated: use Triggers() instead

func (*ActionManager) ListVersions deprecated added in v5.18.0

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

ListVersions of an action.

Deprecated: use Versions() instead.

func (*ActionManager) Read added in v5.18.0

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) ReadExecution deprecated added in v5.18.0

func (m *ActionManager) ReadExecution(executionId string, opts ...RequestOption) (v *ActionExecution, err error)

ReadExecution retrieves the details of an action execution

Deprecated: use Execution() instead

func (*ActionManager) ReadVersion deprecated added in v5.18.0

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

ReadVersion retrieves the version of an action.

Deprecated: use Version() instead.

func (*ActionManager) Test added in v5.18.0

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 added in v5.21.0

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 added in v5.18.0

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 added in v5.18.0

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 added in v5.21.0

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 added in v5.21.0

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 added in v5.18.0

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

func (*ActionSecret) GetName added in v5.18.0

func (a *ActionSecret) GetName() string

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

func (*ActionSecret) GetUpdatedAt added in v5.18.0

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

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

func (*ActionSecret) GetValue added in v5.18.0

func (a *ActionSecret) GetValue() string

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

func (*ActionSecret) String added in v5.18.0

func (a *ActionSecret) String() string

String returns a string representation of ActionSecret.

type ActionTestPayload added in v5.18.0

type ActionTestPayload map[string]interface{}

type ActionTrigger added in v5.18.0

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

func (*ActionTrigger) GetID added in v5.18.0

func (a *ActionTrigger) GetID() string

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

func (*ActionTrigger) GetStatus added in v5.18.0

func (a *ActionTrigger) GetStatus() string

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

func (*ActionTrigger) GetVersion added in v5.18.0

func (a *ActionTrigger) GetVersion() string

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

func (*ActionTrigger) String added in v5.18.0

func (a *ActionTrigger) String() string

String returns a string representation of ActionTrigger.

type ActionTriggerList added in v5.18.0

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

func (*ActionTriggerList) String added in v5.18.0

func (a *ActionTriggerList) String() string

String returns a string representation of ActionTriggerList.

type ActionVersion added in v5.18.0

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"`
}

func (*ActionVersion) GetAction added in v5.18.0

func (a *ActionVersion) GetAction() *Action

GetAction returns the Action field.

func (*ActionVersion) GetBuiltAt added in v5.18.0

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

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

func (*ActionVersion) GetCode added in v5.18.0

func (a *ActionVersion) GetCode() string

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

func (*ActionVersion) GetCreatedAt added in v5.18.0

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

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

func (*ActionVersion) GetID added in v5.18.0

func (a *ActionVersion) GetID() string

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

func (*ActionVersion) GetStatus added in v5.18.0

func (a *ActionVersion) GetStatus() string

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

func (*ActionVersion) GetUpdatedAt added in v5.18.0

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

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

func (*ActionVersion) String added in v5.18.0

func (a *ActionVersion) String() string

String returns a string representation of ActionVersion.

type ActionVersionError added in v5.18.0

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

func (*ActionVersionError) GetID added in v5.18.0

func (a *ActionVersionError) GetID() string

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

func (*ActionVersionError) GetMessage added in v5.18.0

func (a *ActionVersionError) GetMessage() string

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

func (*ActionVersionError) GetUrl added in v5.18.0

func (a *ActionVersionError) GetUrl() string

GetUrl returns the Url field if it's non-nil, zero value otherwise.

func (*ActionVersionError) String added in v5.18.0

func (a *ActionVersionError) String() string

String returns a string representation of ActionVersionError.

type ActionVersionList added in v5.18.0

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

func (*ActionVersionList) String added in v5.18.0

func (a *ActionVersionList) String() string

String returns a string representation of ActionVersionList.

type AnomalyManager added in v5.17.0

type AnomalyManager struct {
	*Management
}

func (*AnomalyManager) CheckIP added in v5.17.0

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

Check 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 added in v5.17.0

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

Unblock 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 BlacklistManager

type BlacklistManager struct {
	*Management
}

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"`
}

func (*BlacklistToken) String

func (b *BlacklistToken) String() string

String returns a string representation of BlacklistToken.

type Branding

type Branding struct {
	// Change password page settings
	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"`
}

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:"-"`
}

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"`
}

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
}

func (*BrandingManager) DeleteUniversalLogin added in v5.4.0

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

Delete template for 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)

Retrieve various settings related to branding.

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

func (*BrandingManager) SetUniversalLogin added in v5.4.0

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

Set template for the New Universal Login Experience.

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

func (*BrandingManager) UniversalLogin added in v5.4.0

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

Retrieve template for 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"`
}

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 added in v5.4.0

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

func (*BrandingUniversalLogin) GetBody added in v5.4.0

func (b *BrandingUniversalLogin) GetBody() string

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

func (*BrandingUniversalLogin) String added in v5.4.0

func (b *BrandingUniversalLogin) String() string

String returns a string representation of BrandingUniversalLogin.

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"`
}

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) 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) 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 added in v5.19.0

func (c *Client) GetOrganizationRequireBehavior() string

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

func (*Client) GetOrganizationUsage added in v5.19.0

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"`
}

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"`
}

func (*ClientGrantList) String

func (c *ClientGrantList) String() string

String returns a string representation of ClientGrantList.

type ClientGrantManager

type ClientGrantManager struct {
	*Management
}

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)

Retrieves 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"`
}

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 added in v5.17.0

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

func (*ClientJWTConfiguration) String

func (c *ClientJWTConfiguration) String() string

String returns a string representation of ClientJWTConfiguration.

func (*ClientJWTConfiguration) UnmarshalJSON added in v5.17.0

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"`
}

func (*ClientList) String

func (c *ClientList) String() string

String returns a string representation of ClientList.

type ClientManager

type ClientManager struct {
	*Management
}

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
}
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"`
}

func (*ClientNativeSocialLogin) String

func (c *ClientNativeSocialLogin) String() string

String returns a string representation of ClientNativeSocialLogin.

type ClientRefreshToken

type ClientRefreshToken struct {
	// Refresh token types, one of: reusable, rotating
	//
	// Deprecated: use RotationType and ExpirationType instead
	Type *string `json:"type,omitempty"`

	// 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 or not refresh tokens should remain valid indefinitely. If false,
	// "TokenLifetime" should be set
	InfiniteTokenLifetime *bool `json:"infinite_token_lifetime,omitempty"`

	// Whether or not inactive refresh tokens should be 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"`
}

func (*ClientRefreshToken) GetExpirationType

func (c *ClientRefreshToken) GetExpirationType() string

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

func (*ClientRefreshToken) GetIdleTokenLifetime added in v5.9.0

func (c *ClientRefreshToken) GetIdleTokenLifetime() int

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

func (*ClientRefreshToken) GetInfiniteIdleTokenLifetime added in v5.9.0

func (c *ClientRefreshToken) GetInfiniteIdleTokenLifetime() bool

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

func (*ClientRefreshToken) GetInfiniteTokenLifetime added in v5.9.0

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) GetType

func (c *ClientRefreshToken) GetType() string

GetType returns the Type 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"`
}

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) GetName

func (c *Connection) GetName() string

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

func (*Connection) GetProvisioningTicketUrl added in v5.12.0

func (c *Connection) GetProvisioningTicketUrl() string

GetProvisioningTicketUrl returns the ProvisioningTicketUrl 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)

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

type ConnectionGatewayAuthentication added in v5.20.0

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"`
}

func (*ConnectionGatewayAuthentication) GetAudience added in v5.20.0

func (c *ConnectionGatewayAuthentication) GetAudience() string

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

func (*ConnectionGatewayAuthentication) GetMethod added in v5.20.0

func (c *ConnectionGatewayAuthentication) GetMethod() string

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

func (*ConnectionGatewayAuthentication) GetSecret added in v5.20.0

func (c *ConnectionGatewayAuthentication) GetSecret() string

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

func (*ConnectionGatewayAuthentication) GetSecretBase64Encoded added in v5.20.0

func (c *ConnectionGatewayAuthentication) GetSecretBase64Encoded() bool

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

func (*ConnectionGatewayAuthentication) GetSubject added in v5.20.0

func (c *ConnectionGatewayAuthentication) GetSubject() string

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

func (*ConnectionGatewayAuthentication) String added in v5.20.0

String returns a string representation of ConnectionGatewayAuthentication.

type ConnectionList

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

func (*ConnectionList) String

func (c *ConnectionList) String() string

String returns a string representation of ConnectionList.

type ConnectionManager

type ConnectionManager struct {
	*Management
}

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
c := &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(c.GetID())

err := api.Connection.Create(c)
if err != nil {
	// handle err
}
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"

	"gopkg.in/auth0.v5/management"
)

var api *management.Management

func main() {
	l, err := api.Connection.List(
		management.Parameter("strategy", "auth0"),
	)
	if err != nil {
		// handle err
	}
	for _, c := range l.Connections {

		fmt.Println(c.GetName())

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

Username-Password-Authentication
	Password Policy: good
	Multi-Factor Auth Enabled: true

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"`
}

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 added in v5.14.0

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 added in v5.10.0

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"`
}

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 added in v5.14.0

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"`
}

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 added in v5.14.0

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"`
}

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 added in v5.14.0

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 added in v5.9.0

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

func (*ConnectionOptionsApple) SetScopes

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

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"`
}

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 added in v5.14.0

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

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

func (*ConnectionOptionsAzureAD) GetSetUserAttributes added in v5.9.0

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 added in v5.12.0

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

func (*ConnectionOptionsAzureAD) SetScopes

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

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 map[string]string `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"`
}

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 added in v5.14.0

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 added in v5.9.0

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"`
}

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"`
}

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 added in v5.14.0

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 added in v5.9.0

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

func (*ConnectionOptionsFacebook) SetScopes

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

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"`
}

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 added in v5.14.0

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

func (*ConnectionOptionsGitHub) SetScopes

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

func (*ConnectionOptionsGitHub) String

func (c *ConnectionOptionsGitHub) String() string

String returns a string representation of ConnectionOptionsGitHub.

type ConnectionOptionsGoogleApps added in v5.16.0

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_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"`

	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"`
}

func (*ConnectionOptionsGoogleApps) GetAdmin added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetAdmin() bool

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

func (*ConnectionOptionsGoogleApps) GetAgreedTerms added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetAgreedTerms() bool

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

func (*ConnectionOptionsGoogleApps) GetBasicProfile added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetBasicProfile() bool

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

func (*ConnectionOptionsGoogleApps) GetClientID added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetClientID() string

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

func (*ConnectionOptionsGoogleApps) GetClientSecret added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetClientSecret() string

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

func (*ConnectionOptionsGoogleApps) GetDomain added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetDomain() string

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

func (*ConnectionOptionsGoogleApps) GetEnableUsersAPI added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetEnableUsersAPI() bool

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

func (*ConnectionOptionsGoogleApps) GetExtendedProfile added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetExtendedProfile() bool

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

func (*ConnectionOptionsGoogleApps) GetGroups added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetGroups() bool

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

func (*ConnectionOptionsGoogleApps) GetIsSuspended added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetIsSuspended() bool

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

func (*ConnectionOptionsGoogleApps) GetLogoURL added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetLogoURL() string

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

func (*ConnectionOptionsGoogleApps) GetNonPersistentAttrs added in v5.16.0

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

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

func (*ConnectionOptionsGoogleApps) GetSetUserAttributes added in v5.16.0

func (c *ConnectionOptionsGoogleApps) GetSetUserAttributes() string

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

func (*ConnectionOptionsGoogleApps) GetTenantDomain added in v5.19.2

func (c *ConnectionOptionsGoogleApps) GetTenantDomain() string

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

func (*ConnectionOptionsGoogleApps) Scopes added in v5.19.2

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

func (*ConnectionOptionsGoogleApps) SetScopes added in v5.19.2

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

func (*ConnectionOptionsGoogleApps) String added in v5.16.0

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"`
}

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 added in v5.14.0

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 added in v5.9.0

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

func (*ConnectionOptionsGoogleOAuth2) SetScopes

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

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"`
}

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 added in v5.14.0

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

func (*ConnectionOptionsLinkedin) SetScopes

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

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"`
	// Scripts for the connection
	// Allowed keys are: "fetchUserProfile"
	Scripts map[string]interface{} `json:"scripts,omitempty"`
}

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) GetNonPersistentAttrs added in v5.14.0

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

GetNonPersistentAttrs returns the NonPersistentAttrs 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 added in v5.9.0

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

func (*ConnectionOptionsOAuth2) SetScopes

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

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"`
}

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 added in v5.14.0

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 added in v5.11.0

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

func (*ConnectionOptionsOIDC) SetScopes

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

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"`
}

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"`
	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"`
}

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) GetEntityID added in v5.14.1

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 added in v5.14.0

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 added in v5.2.2

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 added in v5.20.0

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"`
}

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 added in v5.14.0

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

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

func (*ConnectionOptionsSAMLIdpInitiated) GetSetUserAttributes added in v5.14.0

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 added in v5.20.0

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

func (*ConnectionOptionsSAMLSigningKey) GetCert added in v5.20.0

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

func (*ConnectionOptionsSAMLSigningKey) GetKey added in v5.20.0

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

func (*ConnectionOptionsSAMLSigningKey) String added in v5.20.0

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 map[string]string `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"`
}

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 added in v5.20.0

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 added in v5.20.0

func (c *ConnectionOptionsSMS) GetGatewayAuthentication() *ConnectionGatewayAuthentication

GetGatewayAuthentication returns the GatewayAuthentication field.

func (*ConnectionOptionsSMS) GetGatewayUrl added in v5.20.0

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 added in v5.20.0

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"`
}

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 added in v5.14.0

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

func (*ConnectionOptionsSalesforce) SetScopes

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

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"`
}

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 added in v5.14.0

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

func (*ConnectionOptionsWindowsLive) SetScopes

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

func (*ConnectionOptionsWindowsLive) String

String returns a string representation of ConnectionOptionsWindowsLive.

type CreateEnrollmentTicket added in v5.14.0

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"`
}

func (*CreateEnrollmentTicket) String added in v5.14.0

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 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"`
}

func (*CustomDomain) GetCustomClientIPHeader added in v5.19.0

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) 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 added in v5.19.0

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
}

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)

Retrieve a custom domain configuration and status.

See: https://auth0.com/docs/api/management/v2#!/Custom_Domains/get_custom_domains_by_id

func (*CustomDomainManager) Update added in v5.19.0

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)

Run the verification process on 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"`
}

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"`
}

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"`
}

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"`
}

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
}

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)

Retrieve 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"`
}

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) 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
}

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)

Retrieve 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)

Modify an email template.

See: https://auth0.com/docs/api/management/v2#!/Email_Templates/patch_email_templates_by_templateName

type Enrollment added in v5.12.0

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"`
}

func (*Enrollment) GetEnrolledAt added in v5.12.0

func (e *Enrollment) GetEnrolledAt() time.Time

GetEnrolledAt returns the EnrolledAt field if it's non-nil, zero value otherwise.

func (*Enrollment) GetID added in v5.12.0

func (e *Enrollment) GetID() string

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

func (*Enrollment) GetIdentifier added in v5.12.0

func (e *Enrollment) GetIdentifier() string

GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.

func (*Enrollment) GetLastAuth added in v5.12.0

func (e *Enrollment) GetLastAuth() time.Time

GetLastAuth returns the LastAuth field if it's non-nil, zero value otherwise.

func (*Enrollment) GetName added in v5.12.0

func (e *Enrollment) GetName() string

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

func (*Enrollment) GetPhoneNumber added in v5.12.0

func (e *Enrollment) GetPhoneNumber() string

GetPhoneNumber returns the PhoneNumber field if it's non-nil, zero value otherwise.

func (*Enrollment) GetStatus added in v5.12.0

func (e *Enrollment) GetStatus() string

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

func (*Enrollment) String added in v5.12.0

func (e *Enrollment) String() string

String returns a string representation of Enrollment.

type EnrollmentManager added in v5.12.0

type EnrollmentManager struct {
	*Management
}

func (*EnrollmentManager) CreateTicket added in v5.14.0

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 added in v5.12.0

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 added in v5.12.0

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 added in v5.14.0

type EnrollmentTicket struct {
	TicketID  string `json:"ticket_id"`
	TicketURL string `json:"ticket_url"`
}

func (*EnrollmentTicket) String added in v5.14.0

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"`
}

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 added in v5.14.0

type GrantList struct {
	List
	Grants []*Grant `json:"grants"`
}

func (*GrantList) String added in v5.14.0

func (g *GrantList) String() string

String returns a string representation of GrantList.

type GrantManager

type GrantManager struct {
	*Management
}

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
}

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"`
}

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"`
}

func (*HookList) String

func (h *HookList) String() string

String returns a string representation of HookList.

type HookManager

type HookManager struct {
	*Management
}

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)

Retrieve 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 added in v5.5.0

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"`
}

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
}

func (*JobManager) ExportUsers

func (m *JobManager) ExportUsers(j *Job, opts ...RequestOption) error

Export 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

Import 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)

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

type List

type List struct {
	Start  int `json:"start"`
	Limit  int `json:"limit"`
	Length int `json:"length"`
	Total  int `json:"total"`
}

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

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"`
}

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 added in v5.12.0

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

type LogManager

type LogManager struct {
	*Management
}

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)

Retrieves 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 added in v5.2.0

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"`

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

func (*LogStream) GetID added in v5.2.0

func (l *LogStream) GetID() string

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

func (*LogStream) GetName added in v5.2.0

func (l *LogStream) GetName() string

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

func (*LogStream) GetStatus added in v5.2.0

func (l *LogStream) GetStatus() string

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

func (*LogStream) GetType added in v5.2.0

func (l *LogStream) GetType() string

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

func (*LogStream) MarshalJSON added in v5.2.0

func (ls *LogStream) MarshalJSON() ([]byte, error)

func (*LogStream) String added in v5.2.0

func (l *LogStream) String() string

String returns a string representation of LogStream.

func (*LogStream) UnmarshalJSON added in v5.2.0

func (ls *LogStream) UnmarshalJSON(b []byte) error

type LogStreamManager added in v5.2.0

type LogStreamManager struct {
	*Management
}

func (*LogStreamManager) Create added in v5.2.0

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 added in v5.2.0

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 added in v5.2.0

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 added in v5.2.0

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 added in v5.2.0

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 added in v5.2.0

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"`
}

func (*LogStreamSinkAmazonEventBridge) GetAccountID added in v5.2.0

func (l *LogStreamSinkAmazonEventBridge) GetAccountID() string

GetAccountID returns the AccountID field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAmazonEventBridge) GetPartnerEventSource added in v5.2.0

func (l *LogStreamSinkAmazonEventBridge) GetPartnerEventSource() string

GetPartnerEventSource returns the PartnerEventSource field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAmazonEventBridge) GetRegion added in v5.2.0

func (l *LogStreamSinkAmazonEventBridge) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAmazonEventBridge) String added in v5.2.0

String returns a string representation of LogStreamSinkAmazonEventBridge.

type LogStreamSinkAzureEventGrid added in v5.2.0

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"`
}

func (*LogStreamSinkAzureEventGrid) GetPartnerTopic added in v5.2.0

func (l *LogStreamSinkAzureEventGrid) GetPartnerTopic() string

GetPartnerTopic returns the PartnerTopic field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) GetRegion added in v5.2.0

func (l *LogStreamSinkAzureEventGrid) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) GetResourceGroup added in v5.2.0

func (l *LogStreamSinkAzureEventGrid) GetResourceGroup() string

GetResourceGroup returns the ResourceGroup field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) GetSubscriptionID added in v5.2.0

func (l *LogStreamSinkAzureEventGrid) GetSubscriptionID() string

GetSubscriptionID returns the SubscriptionID field if it's non-nil, zero value otherwise.

func (*LogStreamSinkAzureEventGrid) String added in v5.2.0

func (l *LogStreamSinkAzureEventGrid) String() string

String returns a string representation of LogStreamSinkAzureEventGrid.

type LogStreamSinkDatadog added in v5.2.0

type LogStreamSinkDatadog struct {
	// Datadog Region
	Region *string `json:"datadogRegion,omitempty"`
	// Datadog Api Key
	APIKey *string `json:"datadogApiKey,omitempty"`
}

func (*LogStreamSinkDatadog) GetAPIKey added in v5.2.0

func (l *LogStreamSinkDatadog) GetAPIKey() string

GetAPIKey returns the APIKey field if it's non-nil, zero value otherwise.

func (*LogStreamSinkDatadog) GetRegion added in v5.2.0

func (l *LogStreamSinkDatadog) GetRegion() string

GetRegion returns the Region field if it's non-nil, zero value otherwise.

func (*LogStreamSinkDatadog) String added in v5.2.0

func (l *LogStreamSinkDatadog) String() string

String returns a string representation of LogStreamSinkDatadog.

type LogStreamSinkHTTP added in v5.2.0

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"`
}

func (*LogStreamSinkHTTP) GetAuthorization added in v5.2.0

func (l *LogStreamSinkHTTP) GetAuthorization() string

GetAuthorization returns the Authorization field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) GetContentFormat added in v5.2.0

func (l *LogStreamSinkHTTP) GetContentFormat() string

GetContentFormat returns the ContentFormat field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) GetContentType added in v5.2.0

func (l *LogStreamSinkHTTP) GetContentType() string

GetContentType returns the ContentType field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) GetEndpoint added in v5.2.0

func (l *LogStreamSinkHTTP) GetEndpoint() string

GetEndpoint returns the Endpoint field if it's non-nil, zero value otherwise.

func (*LogStreamSinkHTTP) String added in v5.2.0

func (l *LogStreamSinkHTTP) String() string

String returns a string representation of LogStreamSinkHTTP.

type LogStreamSinkSplunk added in v5.2.0

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"`
}

func (*LogStreamSinkSplunk) GetDomain added in v5.2.0

func (l *LogStreamSinkSplunk) GetDomain() string

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

func (*LogStreamSinkSplunk) GetPort added in v5.2.0

func (l *LogStreamSinkSplunk) GetPort() string

GetPort returns the Port field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSplunk) GetSecure added in v5.2.0

func (l *LogStreamSinkSplunk) GetSecure() bool

GetSecure returns the Secure field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSplunk) GetToken added in v5.2.0

func (l *LogStreamSinkSplunk) GetToken() string

GetToken returns the Token field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSplunk) String added in v5.2.0

func (l *LogStreamSinkSplunk) String() string

String returns a string representation of LogStreamSinkSplunk.

type LogStreamSinkSumo added in v5.8.0

type LogStreamSinkSumo struct {
	// Sumo Source Address
	SourceAddress *string `json:"sumoSourceAddress,omitempty"`
}

func (*LogStreamSinkSumo) GetSourceAddress added in v5.8.0

func (l *LogStreamSinkSumo) GetSourceAddress() string

GetSourceAddress returns the SourceAddress field if it's non-nil, zero value otherwise.

func (*LogStreamSinkSumo) String added in v5.8.0

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
	// 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 ...ManagementOption) (*Management, error)

New creates a new Auth0 Management client by authenticating using the supplied client id and secret.

Example
package main

import (
	"os"

	"gopkg.in/auth0.v5/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
	}
	_, _ = 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 ManagementOption

type ManagementOption func(*Management)

func WithClient

func WithClient(client *http.Client) ManagementOption

WithClient configures management to use the provided client.

func WithClientCredentials

func WithClientCredentials(clientID, clientSecret string) ManagementOption

WithClientCredentials configures management to authenticate using the client credentials authentication flow.

func WithContext

func WithContext(ctx context.Context) ManagementOption

WitContext configures the management client to use the provided context instead of the provided one.

func WithDebug

func WithDebug(d bool) ManagementOption

WithDebug configures the management client to dump http requests and responses to stdout.

func WithInsecure added in v5.2.1

func WithInsecure() ManagementOption

WithInsecure configures management to not use an authentication token and use HTTP instead of HTTPS.

This options is available for testing purposes and should not be used in production.

func WithStaticToken

func WithStaticToken(token string) ManagementOption

WithStaticToken configures management to authenticate using a static authentication token.

func WithUserAgent

func WithUserAgent(userAgent string) ManagementOption

WithUserAgent configures the management client to use the provided user agent string instead of the default one.

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"`
}

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 }

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) String

func (m *MultiFactorDUO) String() string

String returns a string representation of MultiFactorDUO.

type MultiFactorEmail

type MultiFactorEmail struct{ *Management }

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
	WebAuthnRoaming  *MultiFactorWebAuthnRoaming
	WebAuthnPlatform *MultiFactorWebAuthnPlatform
}

func (*MultiFactorManager) List

func (m *MultiFactorManager) List(opts ...RequestOption) (mf []*MultiFactor, err error)

Retrieves all factors.

See: https://auth0.com/docs/api/management/v2#!/Guardian/get_factors

func (*MultiFactorManager) Policy added in v5.12.0

func (m *MultiFactorManager) Policy(opts ...RequestOption) (p *MultiFactorPolicies, err error)

Get MFA policies

See: https://auth0.com/docs/api/management/v2/#!/Guardian/get_policies

func (*MultiFactorManager) UpdatePolicy added in v5.12.0

func (m *MultiFactorManager) UpdatePolicy(p *MultiFactorPolicies, opts ...RequestOption) error

Update 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 }

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 added in v5.12.0

type MultiFactorPhone struct{ *Management }

func (*MultiFactorPhone) Enable added in v5.12.0

func (m *MultiFactorPhone) Enable(enabled bool, opts ...RequestOption) error

Update MFA Phone to be enabled. See: https://auth0.com/docs/api/management/v2/#!/Guardian/put_factors_by_name

func (*MultiFactorPhone) MessageTypes added in v5.12.0

func (m *MultiFactorPhone) MessageTypes(opts ...RequestOption) (mt *PhoneMessageTypes, err error)

Retrieves the MFA Phone Message Type See: https://auth0.com/docs/api/management/v2/#!/Guardian/get_message_types

func (*MultiFactorPhone) Provider added in v5.12.0

func (m *MultiFactorPhone) Provider(opts ...RequestOption) (p *MultiFactorProvider, err error)

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 added in v5.12.0

func (m *MultiFactorPhone) String() string

String returns a string representation of MultiFactorPhone.

func (*MultiFactorPhone) UpdateMessageTypes added in v5.12.0

func (m *MultiFactorPhone) UpdateMessageTypes(mt *PhoneMessageTypes, opts ...RequestOption) error

Update MFA Phone Message Type See: https://auth0.com/docs/api/management/v2/#!/Guardian/put_message_types

func (*MultiFactorPhone) UpdateProvider added in v5.12.0

func (m *MultiFactorPhone) UpdateProvider(p *MultiFactorProvider, opts ...RequestOption) error

Update 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 added in v5.12.0

type MultiFactorPolicies []string

type MultiFactorProvider added in v5.12.0

type MultiFactorProvider struct {
	// One of auth0|twilio|phone-message-hook
	Provider *string `json:"provider,omitempty"`
}

func (*MultiFactorProvider) GetProvider added in v5.12.0

func (m *MultiFactorProvider) GetProvider() string

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

func (*MultiFactorProvider) String added in v5.12.0

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"`
}

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"`
}

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 }

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) 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

type MultiFactorSMS

type MultiFactorSMS struct{ *Management }

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"`
}

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 added in v5.20.0

type MultiFactorWebAuthnPlatform struct{ *Management }

func (*MultiFactorWebAuthnPlatform) Enable added in v5.20.0

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) String added in v5.20.0

func (m *MultiFactorWebAuthnPlatform) String() string

String returns a string representation of MultiFactorWebAuthnPlatform.

type MultiFactorWebAuthnRoaming added in v5.20.0

type MultiFactorWebAuthnRoaming struct{ *Management }

func (*MultiFactorWebAuthnRoaming) Enable added in v5.20.0

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) String added in v5.20.0

func (m *MultiFactorWebAuthnRoaming) String() string

String returns a string representation of MultiFactorWebAuthnRoaming.

type Organization added in v5.19.0

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"`
}

func (*Organization) GetBranding added in v5.19.0

func (o *Organization) GetBranding() *OrganizationBranding

GetBranding returns the Branding field.

func (*Organization) GetDisplayName added in v5.19.0

func (o *Organization) GetDisplayName() string

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

func (*Organization) GetID added in v5.19.0

func (o *Organization) GetID() string

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

func (*Organization) GetName added in v5.19.0

func (o *Organization) GetName() string

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

func (*Organization) String added in v5.19.0

func (o *Organization) String() string

String returns a string representation of Organization.

type OrganizationBranding added in v5.19.0

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"`
}

func (*OrganizationBranding) GetLogoURL added in v5.20.0

func (o *OrganizationBranding) GetLogoURL() string

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

func (*OrganizationBranding) String added in v5.19.0

func (o *OrganizationBranding) String() string

String returns a string representation of OrganizationBranding.

type OrganizationConnection added in v5.19.0

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"`
}

func (*OrganizationConnection) GetAssignMembershipOnLogin added in v5.19.0

func (o *OrganizationConnection) GetAssignMembershipOnLogin() bool

GetAssignMembershipOnLogin returns the AssignMembershipOnLogin field if it's non-nil, zero value otherwise.

func (*OrganizationConnection) GetConnection added in v5.19.0

GetConnection returns the Connection field.

func (*OrganizationConnection) GetConnectionID added in v5.19.0

func (o *OrganizationConnection) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*OrganizationConnection) String added in v5.19.0

func (o *OrganizationConnection) String() string

String returns a string representation of OrganizationConnection.

type OrganizationConnectionDetails added in v5.19.0

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"`
}

func (*OrganizationConnectionDetails) GetName added in v5.19.0

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

func (*OrganizationConnectionDetails) GetStrategy added in v5.19.0

func (o *OrganizationConnectionDetails) GetStrategy() string

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

func (*OrganizationConnectionDetails) String added in v5.19.0

String returns a string representation of OrganizationConnectionDetails.

type OrganizationConnectionList added in v5.19.0

type OrganizationConnectionList struct {
	List
	OrganizationConnections []*OrganizationConnection `json:"enabled_connections"`
}

func (*OrganizationConnectionList) String added in v5.19.0

func (o *OrganizationConnectionList) String() string

String returns a string representation of OrganizationConnectionList.

type OrganizationInvitation added in v5.19.0

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"`
}

func (*OrganizationInvitation) GetClientID added in v5.19.0

func (o *OrganizationInvitation) GetClientID() string

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

func (*OrganizationInvitation) GetConnectionID added in v5.19.0

func (o *OrganizationInvitation) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetCreatedAt added in v5.19.0

func (o *OrganizationInvitation) GetCreatedAt() string

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

func (*OrganizationInvitation) GetExpiresAt added in v5.19.0

func (o *OrganizationInvitation) GetExpiresAt() string

GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetID added in v5.19.0

func (o *OrganizationInvitation) GetID() string

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

func (*OrganizationInvitation) GetInvitationURL added in v5.20.0

func (o *OrganizationInvitation) GetInvitationURL() string

GetInvitationURL returns the InvitationURL field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetInvitee added in v5.19.0

GetInvitee returns the Invitee field.

func (*OrganizationInvitation) GetInviter added in v5.19.0

GetInviter returns the Inviter field.

func (*OrganizationInvitation) GetOrganizationID added in v5.19.0

func (o *OrganizationInvitation) GetOrganizationID() string

GetOrganizationID returns the OrganizationID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetSendInvitationEmail added in v5.19.0

func (o *OrganizationInvitation) GetSendInvitationEmail() bool

GetSendInvitationEmail returns the SendInvitationEmail field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetTTLSec added in v5.19.0

func (o *OrganizationInvitation) GetTTLSec() int

GetTTLSec returns the TTLSec field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) GetTicketID added in v5.19.0

func (o *OrganizationInvitation) GetTicketID() string

GetTicketID returns the TicketID field if it's non-nil, zero value otherwise.

func (*OrganizationInvitation) String added in v5.19.0

func (o *OrganizationInvitation) String() string

String returns a string representation of OrganizationInvitation.

type OrganizationInvitationInvitee added in v5.19.0

type OrganizationInvitationInvitee struct {
	// The invitee's email.
	Email *string `json:"email,omitempty"`
}

func (*OrganizationInvitationInvitee) GetEmail added in v5.19.0

func (o *OrganizationInvitationInvitee) GetEmail() string

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

func (*OrganizationInvitationInvitee) String added in v5.19.0

String returns a string representation of OrganizationInvitationInvitee.

type OrganizationInvitationInviter added in v5.19.0

type OrganizationInvitationInviter struct {
	// The inviter's name.
	Name *string `json:"name,omitempty"`
}

func (*OrganizationInvitationInviter) GetName added in v5.19.0

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

func (*OrganizationInvitationInviter) String added in v5.19.0

String returns a string representation of OrganizationInvitationInviter.

type OrganizationInvitationList added in v5.19.0

type OrganizationInvitationList struct {
	List
	OrganizationInvitations []*OrganizationInvitation `json:"invitations"`
}

func (*OrganizationInvitationList) String added in v5.19.0

func (o *OrganizationInvitationList) String() string

String returns a string representation of OrganizationInvitationList.

type OrganizationList added in v5.19.0

type OrganizationList struct {
	List
	Organizations []*Organization `json:"organizations"`
}

func (*OrganizationList) String added in v5.19.0

func (o *OrganizationList) String() string

String returns a string representation of OrganizationList.

type OrganizationManager added in v5.19.0

type OrganizationManager struct {
	*Management
}

func (*OrganizationManager) AddConnection added in v5.19.0

func (m *OrganizationManager) AddConnection(id string, c *OrganizationConnection, opts ...RequestOption) (err error)

Add connections to an organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_enabled_connections

func (*OrganizationManager) AddMembers added in v5.19.0

func (m *OrganizationManager) AddMembers(id string, memberIDs []string, opts ...RequestOption) (err error)

Add members to an organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_members

func (*OrganizationManager) AssignMemberRoles added in v5.19.0

func (m *OrganizationManager) AssignMemberRoles(id string, memberID string, roles []string, opts ...RequestOption) (err error)

Assign 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 added in v5.19.0

func (m *OrganizationManager) Connection(id string, connectionID string, opts ...RequestOption) (c *OrganizationConnection, err error)

Get an enabled connection for an organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_enabled_connections_by_connectionId

func (*OrganizationManager) Connections added in v5.19.0

func (m *OrganizationManager) Connections(id string, opts ...RequestOption) (c *OrganizationConnectionList, err error)

Get connections enabled for an organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_enabled_connections

func (*OrganizationManager) Create added in v5.19.0

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 added in v5.19.0

func (m *OrganizationManager) CreateInvitation(id string, i *OrganizationInvitation, opts ...RequestOption) (err error)

Create invitations to organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/post_invitations

func (*OrganizationManager) Delete added in v5.19.0

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 added in v5.19.0

func (m *OrganizationManager) DeleteConnection(id string, connectionID string, opts ...RequestOption) (err error)

Delete connections from an organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_enabled_connections_by_connectionId

func (*OrganizationManager) DeleteInvitation added in v5.19.0

func (m *OrganizationManager) DeleteInvitation(id string, invitationID string, opts ...RequestOption) (err error)

Delete an invitation to organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_invitations_by_invitation_id

func (*OrganizationManager) DeleteMember added in v5.19.0

func (m *OrganizationManager) DeleteMember(id string, memberIDs []string, opts ...RequestOption) (err error)

Delete members from an organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/delete_members

func (*OrganizationManager) DeleteMemberRoles added in v5.19.0

func (m *OrganizationManager) DeleteMemberRoles(id string, memberID string, roles []string, opts ...RequestOption) (err error)

Remove 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 added in v5.19.0

func (m *OrganizationManager) Invitation(id string, invitationID string, opts ...RequestOption) (i *OrganizationInvitation, err error)

Get an invitation to organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_invitations_by_invitation_id

func (*OrganizationManager) Invitations added in v5.19.0

func (m *OrganizationManager) Invitations(id string, opts ...RequestOption) (i *OrganizationInvitationList, err error)

Get invitations to organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_invitations

func (*OrganizationManager) List added in v5.19.0

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 added in v5.19.0

func (m *OrganizationManager) MemberRoles(id string, memberID string, opts ...RequestOption) (r *OrganizationMemberRoleList, err error)

Get the roles assigned to an organization member

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_organization_member_roles

func (*OrganizationManager) Members added in v5.19.0

func (m *OrganizationManager) Members(id string, opts ...RequestOption) (o *OrganizationMemberList, err error)

List organization members

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_members

func (*OrganizationManager) Read added in v5.19.0

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 added in v5.19.0

func (m *OrganizationManager) ReadByName(name string, opts ...RequestOption) (o *Organization, err error)

Get a specific organization by name

See: https://auth0.com/docs/api/management/v2/#!/Organizations/get_name_by_name

func (*OrganizationManager) Update added in v5.19.0

func (m *OrganizationManager) Update(id string, o *Organization, opts ...RequestOption) (err error)

Modify an organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/patch_organizations_by_id

func (*OrganizationManager) UpdateConnection added in v5.19.0

func (m *OrganizationManager) UpdateConnection(id string, connectionID string, c *OrganizationConnection, opts ...RequestOption) (err error)

Modify an enabled_connection belonging to an Organization

See: https://auth0.com/docs/api/management/v2/#!/Organizations/patch_enabled_connections_by_connectionId

type OrganizationMember added in v5.19.0

type OrganizationMember struct {
	UserID  *string `json:"user_id,omitempty"`
	Picture *string `json:"picture,omitempty"`
	Name    *string `json:"name,omitempty"`
	Email   *string `json:"email,omitempty"`
}

func (*OrganizationMember) GetEmail added in v5.19.0

func (o *OrganizationMember) GetEmail() string

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

func (*OrganizationMember) GetName added in v5.19.0

func (o *OrganizationMember) GetName() string

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

func (*OrganizationMember) GetPicture added in v5.19.0

func (o *OrganizationMember) GetPicture() string

GetPicture returns the Picture field if it's non-nil, zero value otherwise.

func (*OrganizationMember) GetUserID added in v5.19.0

func (o *OrganizationMember) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*OrganizationMember) String added in v5.19.0

func (o *OrganizationMember) String() string

String returns a string representation of OrganizationMember.

type OrganizationMemberList added in v5.19.0

type OrganizationMemberList struct {
	List
	Members []OrganizationMember `json:"members"`
}

func (*OrganizationMemberList) String added in v5.19.0

func (o *OrganizationMemberList) String() string

String returns a string representation of OrganizationMemberList.

type OrganizationMemberRole added in v5.19.0

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"`
}

func (*OrganizationMemberRole) GetDescription added in v5.19.0

func (o *OrganizationMemberRole) GetDescription() string

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

func (*OrganizationMemberRole) GetID added in v5.19.0

func (o *OrganizationMemberRole) GetID() string

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

func (*OrganizationMemberRole) GetName added in v5.19.0

func (o *OrganizationMemberRole) GetName() string

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

func (*OrganizationMemberRole) String added in v5.19.0

func (o *OrganizationMemberRole) String() string

String returns a string representation of OrganizationMemberRole.

type OrganizationMemberRoleList added in v5.19.0

type OrganizationMemberRoleList struct {
	List
	Roles []OrganizationMemberRole `json:"roles"`
}

func (*OrganizationMemberRoleList) String added in v5.19.0

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"`
}

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"`
}

func (*PermissionList) String

func (p *PermissionList) String() string

String returns a string representation of PermissionList.

type PhoneMessageTypes added in v5.12.0

type PhoneMessageTypes struct {
	MessageTypes *[]string `json:"message_types,omitempty"`
}

func (*PhoneMessageTypes) GetMessageTypes added in v5.12.0

func (p *PhoneMessageTypes) GetMessageTypes() []string

GetMessageTypes returns the MessageTypes field if it's non-nil, zero value otherwise.

func (*PhoneMessageTypes) String added in v5.12.0

func (p *PhoneMessageTypes) String() string

String returns a string representation of PhoneMessageTypes.

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"`
}

func (*Prompt) GetIdentifierFirst added in v5.12.0

func (p *Prompt) GetIdentifierFirst() bool

GetIdentifierFirst returns the IdentifierFirst 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
}

func (*PromptManager) CustomText added in v5.20.0

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 added in v5.20.0

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 added in v5.4.0

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 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 WithFields deprecated

func WithFields(fields ...string) RequestOption

WithFields configures a request to include the desired fields.

Deprecated: use IncludeFields instead.

func WithoutFields deprecated

func WithoutFields(fields ...string) RequestOption

WithoutFields configures a request to exclude the desired fields.

Deprecated: use ExcludeFields instead.

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"`
}

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"`
}

func (*ResourceServerList) String

func (r *ResourceServerList) String() string

String returns a string representation of ResourceServerList.

type ResourceServerManager

type ResourceServerManager struct {
	*Management
}

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"

	"gopkg.in/auth0.v5/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
	}
	_ = 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"`
}

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"`
}

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"`
}

func (*RoleList) String

func (r *RoleList) String() string

String returns a string representation of RoleList.

type RoleManager

type RoleManager struct {
	*Management
}

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
}
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"`
}

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"`
}

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
}

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"`
}

func (*RuleList) String

func (r *RuleList) String() string

String returns a string representation of RuleList.

type RuleManager

type RuleManager struct {
	*Management
}

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 added in v5.14.0

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"`
}

func (*SigningKey) GetCert added in v5.14.0

func (s *SigningKey) GetCert() string

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

func (*SigningKey) GetCurrent added in v5.14.0

func (s *SigningKey) GetCurrent() bool

GetCurrent returns the Current field if it's non-nil, zero value otherwise.

func (*SigningKey) GetCurrentSince added in v5.14.0

func (s *SigningKey) GetCurrentSince() time.Time

GetCurrentSince returns the CurrentSince field if it's non-nil, zero value otherwise.

func (*SigningKey) GetCurrentUntil added in v5.14.0

func (s *SigningKey) GetCurrentUntil() time.Time

GetCurrentUntil returns the CurrentUntil field if it's non-nil, zero value otherwise.

func (*SigningKey) GetFingerprint added in v5.14.0

func (s *SigningKey) GetFingerprint() string

GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise.

func (*SigningKey) GetKID added in v5.14.0

func (s *SigningKey) GetKID() string

GetKID returns the KID field if it's non-nil, zero value otherwise.

func (*SigningKey) GetNext added in v5.14.0

func (s *SigningKey) GetNext() bool

GetNext returns the Next field if it's non-nil, zero value otherwise.

func (*SigningKey) GetPKCS7 added in v5.14.0

func (s *SigningKey) GetPKCS7() string

GetPKCS7 returns the PKCS7 field if it's non-nil, zero value otherwise.

func (*SigningKey) GetPrevious added in v5.14.0

func (s *SigningKey) GetPrevious() bool

GetPrevious returns the Previous field if it's non-nil, zero value otherwise.

func (*SigningKey) GetRevoked added in v5.14.0

func (s *SigningKey) GetRevoked() bool

GetRevoked returns the Revoked field if it's non-nil, zero value otherwise.

func (*SigningKey) GetRevokedAt added in v5.14.0

func (s *SigningKey) GetRevokedAt() time.Time

GetRevokedAt returns the RevokedAt field if it's non-nil, zero value otherwise.

func (*SigningKey) GetThumbprint added in v5.14.0

func (s *SigningKey) GetThumbprint() string

GetThumbprint returns the Thumbprint field if it's non-nil, zero value otherwise.

func (*SigningKey) String added in v5.14.0

func (s *SigningKey) String() string

String returns a string representation of SigningKey.

type SigningKeyManager added in v5.14.0

type SigningKeyManager struct {
	*Management
}

func (*SigningKeyManager) List added in v5.14.0

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 added in v5.14.0

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 added in v5.14.0

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 added in v5.14.0

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 StatManager

type StatManager struct {
	*Management
}

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 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"`
}

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) 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 added in v5.1.0

func (t *Tenant) MarshalJSON() ([]byte, error)

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"`
}

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"`
}

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"`
}

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 {
	// Enables the first version of the Change Password flow. We've deprecated
	// this option and recommending a safer flow. This flag is only for
	// backwards compatibility.
	ChangePasswordFlowV1 *bool `json:"change_pwd_flow_v1,omitempty"`

	// 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"`
}

func (*TenantFlags) GetAllowChangingEnableSSO

func (t *TenantFlags) GetAllowChangingEnableSSO() bool

GetAllowChangingEnableSSO returns the AllowChangingEnableSSO field if it's non-nil, zero value otherwise.

func (*TenantFlags) GetChangePasswordFlowV1

func (t *TenantFlags) GetChangePasswordFlowV1() bool

GetChangePasswordFlowV1 returns the ChangePasswordFlowV1 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) GetDisableImpersonation

func (t *TenantFlags) GetDisableImpersonation() bool

GetDisableImpersonation returns the DisableImpersonation 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) GetEnableLegacyLogsSearchV2

func (t *TenantFlags) GetEnableLegacyLogsSearchV2() bool

GetEnableLegacyLogsSearchV2 returns the EnableLegacyLogsSearchV2 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) 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"`
}

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
}

func (*TenantManager) Read

func (m *TenantManager) Read(opts ...RequestOption) (t *Tenant, err error)

Retrieve 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 TenantUniversalLogin

type TenantUniversalLogin struct {
	Colors *TenantUniversalLoginColors `json:"colors,omitempty"`
}

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:"-"`
}

func (*TenantUniversalLoginColors) GetPageBackground

func (t *TenantUniversalLoginColors) GetPageBackground() string

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

func (*TenantUniversalLoginColors) GetPageBackgroundGradient added in v5.9.0

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 added in v5.5.0

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

func (*TenantUniversalLoginColors) String

func (t *TenantUniversalLoginColors) String() string

String returns a string representation of TenantUniversalLoginColors.

func (*TenantUniversalLoginColors) UnmarshalJSON added in v5.5.0

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's email.
	// If not specified or if you send 0 the Auth0 default lifetime will be
	// applied.
	TTLSec *int `json:"ttl_sec,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"`
}

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 added in v5.8.0

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
}

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 user's 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 user's username. Only valid if the connection requires a username
	Username *string `json:"username,omitempty"`

	// The user's 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 user's password (mandatory for non SMS connections)
	Password *string `json:"password,omitempty"`

	// The user's 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 is created.
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// The last time the user is 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 (e.g.
	// 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 a SMS connection, they will not receive an verification
	// SMS if this is true.
	PhoneVerified *bool `json:"phone_verified,omitempty"`

	// AppMetadata holds data that the user has read-only access to (e.g. roles,
	// permissions, vip, etc).
	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"`
}

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) 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 added in v5.12.0

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 added in v5.12.0

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) 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 added in v5.12.0

func (u *User) GetScreenName() string

GetScreenName returns the ScreenName field if it's non-nil, zero value otherwise.

func (*User) GetURL added in v5.12.0

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 added in v5.7.0

func (u *User) MarshalJSON() ([]byte, error)

func (*User) String

func (u *User) String() string

String returns a string representation of User.

func (*User) UnmarshalJSON added in v5.7.0

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"`
}

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 added in v5.12.0

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 added in v5.12.0

func (u *UserEnrollment) GetAuthMethod() string

GetAuthMethod returns the AuthMethod field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetEnrolledAt added in v5.12.0

func (u *UserEnrollment) GetEnrolledAt() time.Time

GetEnrolledAt returns the EnrolledAt field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetID added in v5.12.0

func (u *UserEnrollment) GetID() string

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

func (*UserEnrollment) GetIdentifier added in v5.12.0

func (u *UserEnrollment) GetIdentifier() string

GetIdentifier returns the Identifier field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetLastAuth added in v5.12.0

func (u *UserEnrollment) GetLastAuth() time.Time

GetLastAuth returns the LastAuth field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetName added in v5.12.0

func (u *UserEnrollment) GetName() string

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

func (*UserEnrollment) GetPhoneNumber added in v5.12.0

func (u *UserEnrollment) GetPhoneNumber() string

GetPhoneNumber returns the PhoneNumber field if it's non-nil, zero value otherwise.

func (*UserEnrollment) GetStatus added in v5.12.0

func (u *UserEnrollment) GetStatus() string

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

func (*UserEnrollment) GetType added in v5.12.0

func (u *UserEnrollment) GetType() string

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

func (*UserEnrollment) String added in v5.12.0

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"`
}

func (*UserIdentity) GetAccessToken added in v5.4.0

func (u *UserIdentity) GetAccessToken() string

GetAccessToken returns the AccessToken field if it's non-nil, zero value otherwise.

func (*UserIdentity) GetAccessTokenSecret added in v5.12.0

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 added in v5.9.0

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)

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 added in v5.9.0

func (u *UserIdentityLink) GetConnectionID() string

GetConnectionID returns the ConnectionID field if it's non-nil, zero value otherwise.

func (*UserIdentityLink) GetLinkWith added in v5.9.0

func (u *UserIdentityLink) GetLinkWith() string

GetLinkWith returns the LinkWith field if it's non-nil, zero value otherwise.

func (*UserIdentityLink) GetProvider added in v5.9.0

func (u *UserIdentityLink) GetProvider() string

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

func (*UserIdentityLink) GetUserID added in v5.9.0

func (u *UserIdentityLink) GetUserID() string

GetUserID returns the UserID field if it's non-nil, zero value otherwise.

func (*UserIdentityLink) String added in v5.9.0

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"

	"gopkg.in/auth0.v5/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
	}
	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 added in v5.14.0

func (m *UserManager) BlocksByIdentifier(identifier string, opts ...RequestOption) ([]*UserBlock, error)

Blocks 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
}
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 added in v5.12.0

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 added in v5.12.0

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"

	"gopkg.in/auth0.v5/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
	}
	_ = l.Users // users matching name "jane smith"
}
Output:

Example (Pagination)
package main

import (
	"os"

	"gopkg.in/auth0.v5/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
		}
		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 added in v5.19.0

func (m *UserManager) Organizations(id string, opts ...RequestOption) (p *OrganizationList, err error)

List 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 added in v5.12.0

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 added in v5.14.0

func (m *UserManager) UnblockByIdentifier(identifier string, opts ...RequestOption) error

Unblock 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 (*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 added in v5.12.0

type UserRecoveryCode struct {
	RecoveryCode *string `json:"recovery_code,omitempty"`
}

func (*UserRecoveryCode) GetRecoveryCode added in v5.12.0

func (u *UserRecoveryCode) GetRecoveryCode() string

GetRecoveryCode returns the RecoveryCode field if it's non-nil, zero value otherwise.

func (*UserRecoveryCode) String added in v5.12.0

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