management

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Examples

Constants

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"
	ConnectionStrategyAD                  = "ad"
	ConnectionStrategyAzureAD             = "waad"
)

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.

func WithContext

func WithContext(ctx context.Context) apiOption

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

func WithDebug

func WithDebug(d bool) apiOption

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

func WithTimeout

func WithTimeout(t time.Duration) apiOption

WithTimeout configures the management client with a request timeout.

func WithUserAgent

func WithUserAgent(userAgent string) apiOption

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

Types

type BlacklistManager

type BlacklistManager struct {
	*Management
}

func (*BlacklistManager) Create

func (m *BlacklistManager) Create(t *BlacklistToken) 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 ...ListOption) (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) Read

func (m *BrandingManager) Read() (*Branding, error)

Retrieve various settings related to branding.

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

func (*BrandingManager) Update

func (m *BrandingManager) Update(t *Branding) (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 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"`
}

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) 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) (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) (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 ...ListOption) (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) (*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) (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:"lifetime_in_seconds,omitempty"`

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

func (c *ClientJWTConfiguration) String() string

String returns a string representation of ClientJWTConfiguration.

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) (err error)

Create a new client application.

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

Example
package main

import (
	"os"

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

var (
	domain = os.Getenv("AUTH0_DOMAIN")
	id     = os.Getenv("AUTH0_CLIENT_ID")
	secret = os.Getenv("AUTH0_CLIENT_SECRET")

	api *management.Management
)

func init() {
	var err error
	api, err = management.New(domain, id, secret)
	if err != nil {
		panic(err)
	}
}

func main() {
	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) 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 ...ListOption) (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) (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) (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) (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
	Type *string `json:"type,omitempty"`

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

func (*ClientRefreshToken) GetLeeway

func (c *ClientRefreshToken) GetLeeway() int

GetLeeway returns the Leeway 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:"-"`
	RawOptions json.RawMessage `json:"options,omitempty"`

	// 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 *interface{} `json:"metadata,omitempty"`
}

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

Create a new connection.

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

Example
package main

import (
	"os"
	"time"

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

var api *management.Management

func main() {
	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) (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 ...ListOption) (c *ConnectionList, err error)

List all connections.

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

Example
package main

import (
	"fmt"
	"os"

	"github.com/auth0-api/auth0/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) (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) (*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) (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"`
}

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

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

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

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

func (c *ConnectionOptionsApple) GetScope() string

GetScope returns the Scope 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"`
}

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

func (c *ConnectionOptionsAzureAD) GetTenantDomain() string

GetTenantDomain returns the TenantDomain 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"`
}

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

GetOTP returns the OTP field.

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

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

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

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

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

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

func (c *ConnectionOptionsOIDC) GetScope() string

GetScope returns the Scope 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 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"`
	TwilioToken         *string `json:"twilio_token"`
	MessagingServiceSID *string `json:"messaging_service_sid"`

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

func (c *ConnectionOptionsSMS) GetFrom() string

GetFrom returns the From 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) 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"`
}

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

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

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) 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) (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) (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 ...ListOption) (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) (*CustomDomain, 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) Verify

func (m *CustomDomainManager) Verify(id string) (*CustomDomain, 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) 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() (err error)

Delete the email provider.

See: https://auth0.com/docs/api/management/v2#!/Emails/delete_provider

func (*EmailManager) Read

func (m *EmailManager) Read() (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) (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

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) (*EmailTemplate, 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) (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) (err error)

Modify an email template.

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

type Error

type Error interface {
	Status() int
	error
}

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 GrantManager

type GrantManager struct {
	*Management
}

func (*GrantManager) Delete

func (m *GrantManager) Delete(id string, opts ...ListOption) 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 ...ListOption) (g []*Grant, 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 {
	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(r *Hook) 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, r *HookSecrets) (err error)

CreateSecrets creates hook secrets on a hook that has no secrets defined

See: https://auth0.com/docs/api/management/v2#!/Hooks/post_secrets

func (*HookManager) Delete

func (m *HookManager) Delete(id string) 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 ...ListOption) (r *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) (r *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) (err error)

RemoveAllSecrets removes all secrets associated with a given hook

func (*HookManager) RemoveSecrets

func (m *HookManager) RemoveSecrets(hookID string, keys ...string) (err error)

RemoveSecrets removes a list of hook secret keys from a given hook's secrets by the keys of the secrets

See: https://auth0.com/docs/api/management/v2/#!/Hooks/delete_secrets

func (*HookManager) Secrets

func (m *HookManager) Secrets(hookID string) (r *HookSecrets, err error)

Secrets list all secrets configured for the given 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, r *Hook) 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, r *HookSecrets) (err error)

UpdateSecrets updates the values of a hook's secrets that have previously been created

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:"cliend_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) 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) 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) (*Job, 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) 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 ListOption

type ListOption func(url.Values)

ListOption configures a call (typically to retrieve a resource) to Auth0 with query parameters.

func IncludeTotals

func IncludeTotals(include bool) ListOption

IncludeTotals configures a call to include totals.

func Page

func Page(page int) ListOption

Page configures a call to receive a specific page, if the results where concatenated.

func Parameter

func Parameter(key, value string) ListOption

Parameter is a generic configuration to add arbitrary query parameters to calls made to Auth0.

func PerPage

func PerPage(items int) ListOption

PerPage configures a call to limit the amount of items in the result.

func Query

func Query(q string) ListOption

Query configures a call 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

func WithFields(fields ...string) ListOption

WithFields configures a call to include the desired fields.

func WithoutFields

func WithoutFields(fields ...string) ListOption

WithoutFields configures a call to exclude the desired fields.

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 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) 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 ...ListOption) (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) (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 ...ListOption) ([]*Log, error)

Search is an alias for List

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

	// 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
	// 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, clientID, clientSecret string, options ...apiOption) (*Management, error)

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

Example
package main

import (
	"os"

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

var (
	domain = os.Getenv("AUTH0_DOMAIN")
	id     = os.Getenv("AUTH0_CLIENT_ID")
	secret = os.Getenv("AUTH0_CLIENT_SECRET")

	api *management.Management
)

func init() {
	var err error
	api, err = management.New(domain, id, secret)
	if err != nil {
		panic(err)
	}
}

func main() {
	api, err := management.New(domain, id, secret)
	if err != nil {
		// handle err
	}
	_, _ = api.Stat.ActiveUsers()
}
Output:

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 {
	// contains filtered or unexported fields
}

func (*MultiFactorDUO) Enable

func (em *MultiFactorDUO) Enable(enabled bool) 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 {
	// contains filtered or unexported fields
}

func (*MultiFactorEmail) Enable

func (em *MultiFactorEmail) Enable(enabled bool) 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 {
	SMS   *MultiFactorSMS
	Push  *MultiFactorPush
	Email *MultiFactorEmail
	DUO   *MultiFactorDUO
	OTP   *MultiFactorOTP
	// contains filtered or unexported fields
}

func (*MultiFactorManager) List

func (mfm *MultiFactorManager) List(opts ...ListOption) (mf []*MultiFactor, err error)

Retrieves all factors.

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

type MultiFactorOTP

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

func (*MultiFactorOTP) Enable

func (em *MultiFactorOTP) Enable(enabled bool) 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 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 {
	// contains filtered or unexported fields
}

func (*MultiFactorPush) AmazonSNS

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 (pm *MultiFactorPush) Enable(enabled bool) 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 (pm *MultiFactorPush) UpdateAmazonSNS(sc *MultiFactorProviderAmazonSNS) 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 {
	// contains filtered or unexported fields
}

func (*MultiFactorSMS) Enable

func (sm *MultiFactorSMS) Enable(enabled bool) 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 (sm *MultiFactorSMS) Template() (*MultiFactorSMSTemplate, 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

Twilio returns the Twilio provider configuration.

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

func (*MultiFactorSMS) UpdateTemplate

func (sm *MultiFactorSMS) UpdateTemplate(st *MultiFactorSMSTemplate) 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 (sm *MultiFactorSMS) UpdateTwilio(twilio *MultiFactorProviderTwilio) 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 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"`
}

type Prompt

type Prompt struct {
	// Which login experience to use. Can be `new` or `classic`.
	UniversalLoginExperience string `json:"universal_login_experience,omitempty"`
}

func (*Prompt) String

func (p *Prompt) String() string

String returns a string representation of Prompt.

type PromptManager

type PromptManager struct {
	*Management
}

func (*PromptManager) Read

func (m *PromptManager) Read() (*Prompt, error)

Read retrieves prompts settings.

See: https://auth0.com/docs/api/management/v2#!/Prompts/get_prompts

func (*PromptManager) Update

func (m *PromptManager) Update(p *Prompt) error

Update prompts settings.

See: https://auth0.com/docs/api/management/v2#!/Prompts/patch_prompts

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) (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) (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 ...ListOption) (rl *ResourceServerList, err error)

List all resource server.

See: https://auth0.com/docs/api/management/v2#!/Resource_Servers/get_resource_servers

func (*ResourceServerManager) Read

func (m *ResourceServerManager) Read(id string) (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)) error

Stream is a helper method which handles pagination

func (*ResourceServerManager) Update

func (m *ResourceServerManager) Update(id string, rs *ResourceServer) (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) 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) 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) error

Create a new role.

See: https://auth0.com/docs/api/management/v2#!/Roles/post_roles

Example
package main

import (
	"os"

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

var api *management.Management

func main() {
	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) (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 ...ListOption) (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 ...ListOption) (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) (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) 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) (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 ...ListOption) (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) (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 ...ListOption) (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) (*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) (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) 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) 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 ...ListOption) (r *RuleList, err error)

List all rules.

See: https://auth0.com/docs/api/management/v2#!/Roles/get_roles

func (*RuleManager) Read

func (m *RuleManager) Read(id string) (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) error

Update an existing rule.

See: https://auth0.com/docs/api/management/v2#!/Rules/patch_rules_by_id

type StatManager

type StatManager struct {
	*Management
}

func (*StatManager) ActiveUsers

func (m *StatManager) ActiveUsers() (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 ...ListOption) (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 (unit:
	// hours).
	SessionLifetime *int `json:"session_lifetime,omitempty"`

	// Force a user to login after they have been inactive for the specified number (unit: hours)
	IdleSessionLifetime *int `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() int

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

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

	// Background color of your login pages
	PageBackground *string `json:"page_background,omitempty"`
}

func (*TenantUniversalLoginColors) GetPageBackground

func (t *TenantUniversalLoginColors) GetPageBackground() string

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

func (*TenantUniversalLoginColors) GetPrimary

func (t *TenantUniversalLoginColors) GetPrimary() string

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

func (*TenantUniversalLoginColors) String

func (t *TenantUniversalLoginColors) String() string

String returns a string representation of TenantUniversalLoginColors.

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

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) 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) 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) 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 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:"email_verified,omitempty"`

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

	// True if the user is blocked from the application, false if the user is enabled
	Blocked *bool `json:"blocked,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) 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) GetLastLogin

func (u *User) GetLastLogin() time.Time

GetLastLogin returns the LastLogin 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) 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) String

func (u *User) String() string

String returns a string representation of User.

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 UserIdentity

type UserIdentity struct {
	Connection *string `json:"connection,omitempty"`
	UserID     *string `json:"-"`
	Provider   *string `json:"provider,omitempty"`
	IsSocial   *bool   `json:"isSocial,omitempty"`
}

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

AssignRoles assignes roles to a user.

See: https://auth0.com/docs/api/management/v2#!/Users/post_user_roles

Example
package main

import (
	"os"

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

var api *management.Management

var (
	user  = &management.User{}
	admin = &management.Role{}
)

func main() {
	err := api.User.AssignRoles(user.GetID(), admin)
	if err != nil {
		// handle err
	}
	defer api.User.RemoveRoles(user.GetID(), admin)
}
Output:

func (*UserManager) Blocks

func (m *UserManager) Blocks(id string) ([]*UserBlock, error)

Blocks retrieves a list of blocked IP addresses of a particular user.

See: https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks_by_id

func (*UserManager) Create

func (m *UserManager) Create(u *User) 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
package main

import (
	"os"

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

var (
	domain = os.Getenv("AUTH0_DOMAIN")
	id     = os.Getenv("AUTH0_CLIENT_ID")
	secret = os.Getenv("AUTH0_CLIENT_SECRET")

	api *management.Management
)

func init() {
	var err error
	api, err = management.New(domain, id, secret)
	if err != nil {
		panic(err)
	}
}

func main() {
	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) (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) List

func (m *UserManager) List(opts ...ListOption) (ul *UserList, err error)

List all users. This method forces the `include_totals` option.

See: https://auth0.com/docs/api/management/v2#!/Users/get_users

Example
package main

import (
	"os"

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

var (
	domain = os.Getenv("AUTH0_DOMAIN")
	id     = os.Getenv("AUTH0_CLIENT_ID")
	secret = os.Getenv("AUTH0_CLIENT_SECRET")

	api *management.Management
)

func init() {
	var err error
	api, err = management.New(domain, 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"

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

var api *management.Management

func main() {
	var page int
	for {
		l, err := api.User.List(
			management.Query(`logins_count:{100 TO *]`),
			management.Page(page))
		if err != nil {
			// handle err
		}
		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 ...ListOption) (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) Permissions

func (m *UserManager) Permissions(id string, opts ...ListOption) (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) (*User, error)

Read user details for a given user_id.

See: https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id

func (*UserManager) RemovePermissions

func (m *UserManager) RemovePermissions(id string, permissions ...*Permission) 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) 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 ...ListOption) (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 ...ListOption) (ul *UserList, err error)

Search is an alias for List.

func (*UserManager) Unblock

func (m *UserManager) Unblock(id string) error

Unblock a user that was blocked due to an excessive amount of incorrectly provided credentials.

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

func (m *UserManager) Update(id string, u *User) (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

Jump to

Keyboard shortcuts

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