Documentation
¶
Index ¶
- Variables
- func BuildOauthTokenParams(clientID, clientSecret, audience, organization string) url.Values
- func BuildOauthTokenURL(domain string) string
- func Execute()
- func GenMarkdownTree(cmd *cobra.Command, dir string) error
- func GenerateCommandPage(cmd *cobra.Command, w io.Writer) error
- func GenerateDocs() error
- func GenerateHomepage(cmd *cobra.Command, w io.Writer) error
- func GeneratePage(w io.Writer, name, body string, data interface{}) error
- func GenerateParentPage(cmd *cobra.Command, w io.Writer) error
- func GetData(cmd *cobra.Command) (string, error)
- func HasData(cmd *cobra.Command) bool
- func ResolveData(cmd *cobra.Command) (payload string, provided bool, err error)
- func RunLoginAsMachineJWT(ctx context.Context, inputs LoginInputs, cli *cli, cmd *cobra.Command) error
- func RunLoginAsMachineSecret(ctx context.Context, inputs LoginInputs, cli *cli, cmd *cobra.Command) error
- func RunLoginAsUser(ctx context.Context, cli *cli, additionalScopes []string, domain string) (config.Tenant, error)
- func WrappedAliases(cmd *cobra.Command) string
- func WrappedInheritedFlagUsages(cmd *cobra.Command) string
- func WrappedLocalFlagUsages(cmd *cobra.Command) string
- type AculConfig
- type Argument
- func (a *Argument) Ask(cmd *cobra.Command, value interface{}) error
- func (a Argument) GetHelp() string
- func (a Argument) GetIsRequired() bool
- func (a Argument) GetLabel() string
- func (a Argument) GetName() string
- func (a *Argument) Pick(cmd *cobra.Command, result *string, fn pickerOptionsFunc) error
- func (a *Argument) PickMany(cmd *cobra.Command, result *[]string, fn pickerOptionsFunc) error
- type ClientData
- type DataJSONHandler
- type DetectionResult
- type Flag
- func (f *Flag) Ask(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f *Flag) AskBool(cmd *cobra.Command, value *bool, defaultValue *bool) error
- func (f *Flag) AskBoolU(cmd *cobra.Command, value *bool, defaultValue *bool) error
- func (f *Flag) AskInt(cmd *cobra.Command, value *int, defaultValue *string) error
- func (f *Flag) AskIntSlice(cmd *cobra.Command, value *[]int, defaultValue *[]int) error
- func (f *Flag) AskIntU(cmd *cobra.Command, value *int, defaultValue *string) error
- func (f *Flag) AskMany(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f *Flag) AskManyU(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f *Flag) AskPassword(cmd *cobra.Command, value *string) error
- func (f *Flag) AskPasswordU(cmd *cobra.Command, value *string) error
- func (f *Flag) AskU(cmd *cobra.Command, value interface{}, defaultValue *string) error
- func (f Flag) GetHelp() string
- func (f Flag) GetIsRequired() bool
- func (f Flag) GetLabel() string
- func (f Flag) GetName() string
- func (f *Flag) IsSet(cmd *cobra.Command) bool
- func (f *Flag) OpenEditor(cmd *cobra.Command, value *string, defaultValue, filename string, ...) error
- func (f *Flag) OpenEditorU(cmd *cobra.Command, value *string, defaultValue string, filename string) error
- func (f *Flag) OpenEditorW(cmd *cobra.Command, value *string, defaultValue, filename string, ...) error
- func (f *Flag) Pick(cmd *cobra.Command, result *string, fn pickerOptionsFunc) error
- func (f *Flag) PickMany(cmd *cobra.Command, result *[]string, fn pickerOptionsFunc) error
- func (f *Flag) PickU(cmd *cobra.Command, result *string, fn pickerOptionsFunc) error
- func (f *Flag) RegisterBool(cmd *cobra.Command, value *bool, defaultValue bool)
- func (f *Flag) RegisterBoolU(cmd *cobra.Command, value *bool, defaultValue bool)
- func (f *Flag) RegisterInt(cmd *cobra.Command, value *int, defaultValue int)
- func (f *Flag) RegisterIntSlice(cmd *cobra.Command, value *[]int, defaultValue []int)
- func (f *Flag) RegisterIntU(cmd *cobra.Command, value *int, defaultValue int)
- func (f *Flag) RegisterString(cmd *cobra.Command, value *string, defaultValue string)
- func (f *Flag) RegisterStringArray(cmd *cobra.Command, value *[]string, defaultValue []string)
- func (f *Flag) RegisterStringArrayU(cmd *cobra.Command, value *[]string, defaultValue []string)
- func (f *Flag) RegisterStringMap(cmd *cobra.Command, value *map[string]string, defaultValue map[string]string)
- func (f *Flag) RegisterStringMapU(cmd *cobra.Command, value *map[string]string, defaultValue map[string]string)
- func (f *Flag) RegisterStringSlice(cmd *cobra.Command, value *[]string, defaultValue []string)
- func (f *Flag) RegisterStringSliceU(cmd *cobra.Command, value *[]string, defaultValue []string)
- func (f *Flag) RegisterStringU(cmd *cobra.Command, value *string, defaultValue string)
- func (f *Flag) Select(cmd *cobra.Command, value interface{}, options []string, defaultValue *string) error
- func (f *Flag) SelectU(cmd *cobra.Command, value interface{}, options []string, defaultValue *string) error
- type LoginInputs
- type Manifest
- type Metadata
- type Screens
- type SetupInputs
- type Template
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoChangesDetected = fmt.Errorf("no changes detected")
)
var (
PhoneProviderNameOptions = []string{
phoneProviderTwilio,
phoneProviderCustom,
}
)
var PromptScreenMap = map[string][]string{
"captcha": {"interstitial-captcha"},
"email-identifier-challenge": {"email-identifier-challenge"},
"login-id": {"login-id"},
"login-password": {"login-password"},
"login-passwordless": {"login-passwordless-email-code", "login-passwordless-sms-otp"},
"passkeys": {"passkey-enrollment", "passkey-enrollment-local"},
"phone-identifier-challenge": {"phone-identifier-challenge"},
"phone-identifier-enrollment": {"phone-identifier-enrollment"},
"signup-id": {"signup-id"},
"signup-password": {"signup-password"},
"login": {"login"},
"signup": {"signup"},
"mfa": {"mfa-begin-enroll-options", "mfa-detect-browser-capabilities", "mfa-enroll-result", "mfa-login-options"},
"mfa-email": {"mfa-email-challenge", "mfa-email-list"},
"mfa-push": {"mfa-push-challenge-push", "mfa-push-enrollment-qr", "mfa-push-list", "mfa-push-welcome"},
"mfa-sms": {"mfa-country-codes", "mfa-sms-challenge", "mfa-sms-enrollment", "mfa-sms-list"},
"mfa-otp": {"mfa-otp-challenge", "mfa-otp-enrollment-code", "mfa-otp-enrollment-qr"},
"mfa-phone": {"mfa-phone-challenge", "mfa-phone-enrollment"},
"mfa-voice": {"mfa-voice-challenge", "mfa-voice-enrollment"},
"mfa-recovery-code": {"mfa-recovery-code-challenge", "mfa-recovery-code-enrollment", "mfa-recovery-code-challenge-new-code"},
"invitation": {"accept-invitation"},
"organizations": {"organization-picker", "organization-selection", "pre-login-organization-picker"},
"device-flow": {"device-code-activation", "device-code-activation-allowed", "device-code-activation-denied", "device-code-confirmation"},
"common": {"redeem-ticket"},
"email-verification": {"email-verification-result"},
"login-email-verification": {"login-email-verification"},
"logout": {"logout", "logout-aborted", "logout-complete"},
"brute-force-protection": {"brute-force-protection-unblock", "brute-force-protection-unblock-failure", "brute-force-protection-unblock-success"},
"consent": {"consent"},
"customized-consent": {"customized-consent"},
"email-otp-challenge": {"email-otp-challenge"},
"mfa-webauthn": {
"mfa-webauthn-change-key-nickname",
"mfa-webauthn-enrollment-success",
"mfa-webauthn-error",
"mfa-webauthn-platform-challenge",
"mfa-webauthn-platform-enrollment",
"mfa-webauthn-roaming-challenge",
"mfa-webauthn-roaming-enrollment",
"mfa-webauthn-not-available-error",
},
"reset-password": {
"reset-password",
"reset-password-email",
"reset-password-error",
"reset-password-request",
"reset-password-success",
"reset-password-mfa-email-challenge",
"reset-password-mfa-otp-challenge",
"reset-password-mfa-push-challenge-push",
"reset-password-mfa-sms-challenge",
"reset-password-mfa-phone-challenge",
"reset-password-mfa-voice-challenge",
"reset-password-mfa-recovery-code-challenge",
"reset-password-mfa-webauthn-platform-challenge",
"reset-password-mfa-webauthn-roaming-challenge",
},
}
var (
ScreenPromptMap = map[string]string{
"interstitial-captcha": "captcha",
"email-identifier-challenge": "email-identifier-challenge",
"phone-identifier-challenge": "phone-identifier-challenge",
"phone-identifier-enrollment": "phone-identifier-enrollment",
"login-id": "login-id",
"login-password": "login-password",
"signup-id": "signup-id",
"signup-password": "signup-password",
"login": "login",
"signup": "signup",
"login-passwordless-email-code": "login-passwordless",
"login-passwordless-sms-otp": "login-passwordless",
"passkey-enrollment": "passkeys",
"passkey-enrollment-local": "passkeys",
"reset-password": "reset-password",
"reset-password-email": "reset-password",
"reset-password-error": "reset-password",
"reset-password-request": "reset-password",
"reset-password-success": "reset-password",
"reset-password-mfa-email-challenge": "reset-password",
"reset-password-mfa-otp-challenge": "reset-password",
"reset-password-mfa-push-challenge-push": "reset-password",
"reset-password-mfa-sms-challenge": "reset-password",
"reset-password-mfa-phone-challenge": "reset-password",
"reset-password-mfa-voice-challenge": "reset-password",
"reset-password-mfa-recovery-code-challenge": "reset-password",
"reset-password-mfa-webauthn-platform-challenge": "reset-password",
"reset-password-mfa-webauthn-roaming-challenge": "reset-password",
"mfa-begin-enroll-options": "mfa",
"mfa-detect-browser-capabilities": "mfa",
"mfa-enroll-result": "mfa",
"mfa-login-options": "mfa",
"mfa-email-challenge": "mfa-email",
"mfa-email-list": "mfa-email",
"mfa-push-challenge-push": "mfa-push",
"mfa-push-enrollment-qr": "mfa-push",
"mfa-push-list": "mfa-push",
"mfa-push-welcome": "mfa-push",
"mfa-country-codes": "mfa-sms",
"mfa-sms-challenge": "mfa-sms",
"mfa-sms-enrollment": "mfa-sms",
"mfa-sms-list": "mfa-sms",
"mfa-otp-challenge": "mfa-otp",
"mfa-otp-enrollment-code": "mfa-otp",
"mfa-otp-enrollment-qr": "mfa-otp",
"mfa-phone-challenge": "mfa-phone",
"mfa-phone-enrollment": "mfa-phone",
"mfa-voice-challenge": "mfa-voice",
"mfa-voice-enrollment": "mfa-voice",
"mfa-recovery-code-challenge": "mfa-recovery-code",
"mfa-recovery-code-enrollment": "mfa-recovery-code",
"mfa-recovery-code-challenge-new-code": "mfa-recovery-code",
"mfa-webauthn-change-key-nickname": "mfa-webauthn",
"mfa-webauthn-enrollment-success": "mfa-webauthn",
"mfa-webauthn-error": "mfa-webauthn",
"mfa-webauthn-platform-challenge": "mfa-webauthn",
"mfa-webauthn-platform-enrollment": "mfa-webauthn",
"mfa-webauthn-roaming-challenge": "mfa-webauthn",
"mfa-webauthn-roaming-enrollment": "mfa-webauthn",
"mfa-webauthn-not-available-error": "mfa-webauthn",
"accept-invitation": "invitation",
"organization-picker": "organizations",
"organization-selection": "organizations",
"pre-login-organization-picker": "organizations",
"device-code-activation": "device-flow",
"device-code-activation-allowed": "device-flow",
"device-code-activation-denied": "device-flow",
"device-code-confirmation": "device-flow",
"redeem-ticket": "common",
"email-verification-result": "email-verification",
"login-email-verification": "login-email-verification",
"logout": "logout",
"logout-aborted": "logout",
"logout-complete": "logout",
"brute-force-protection-unblock": "brute-force-protection",
"brute-force-protection-unblock-failure": "brute-force-protection",
"brute-force-protection-unblock-success": "brute-force-protection",
"consent": "consent",
"customized-consent": "customized-consent",
"email-otp-challenge": "email-otp-challenge",
}
)
Functions ¶
func BuildOauthTokenParams ¶
func BuildOauthTokenURL ¶
func GenMarkdownTree ¶ added in v1.0.0
GenMarkdownTree is the same as GenMarkdownTree, but with linkHandler.
func GenerateCommandPage ¶ added in v1.0.0
GenerateCommandPage creates custom markdown for the individual command pages.
func GenerateDocs ¶ added in v1.0.0
func GenerateDocs() error
GenerateDocs will generate the documentation for all the commands under the ./docs folder.
func GenerateHomepage ¶ added in v1.0.0
GenerateHomepage creates custom markdown for the homepage.
func GeneratePage ¶ added in v1.0.0
func GenerateParentPage ¶ added in v1.0.0
GenerateParentPage creates custom markdown for the parent command pages.
func ResolveData ¶ added in v1.34.0
ResolveData resolves the JSON payload from --data (inline JSON or @file) or piped stdin; provided is false when neither is given. JSON input is a whole-payload alternative to the individual flags and cannot be combined with them.
func RunLoginAsMachineJWT ¶ added in v1.15.0
func RunLoginAsMachineJWT(ctx context.Context, inputs LoginInputs, cli *cli, cmd *cobra.Command) error
RunLoginAsMachineJWT facilitates the authentication process using the client credentials with Private Key JWT authentication flow. (client ID, client Assertion Private key, client Assertion Signing Algorithm).
func RunLoginAsMachineSecret ¶ added in v1.15.0
func RunLoginAsMachineSecret(ctx context.Context, inputs LoginInputs, cli *cli, cmd *cobra.Command) error
RunLoginAsMachineSecret facilitates the authentication process using client credentials (client ID, client secret).
func RunLoginAsUser ¶ added in v1.0.0
func RunLoginAsUser(ctx context.Context, cli *cli, additionalScopes []string, domain string) (config.Tenant, error)
RunLoginAsUser runs the login flow guiding the user through the process by showing the login instructions, opening the browser.
func WrappedAliases ¶ added in v0.10.3
WrappedAliases returns a formatted string containing the command aliases if defined, otherwise an empty string.
func WrappedInheritedFlagUsages ¶
WrappedInheritedFlagUsages returns a string containing the usage information for all flags which were inherited from parent commands, wrapped to the terminal's width.
func WrappedLocalFlagUsages ¶
WrappedLocalFlagUsages returns a string containing the usage information for all flags specifically set in the current command, wrapped to the terminal's width.
Types ¶
type AculConfig ¶ added in v1.24.0
type Argument ¶ added in v0.3.0
func (Argument) GetIsRequired ¶ added in v0.3.0
type ClientData ¶ added in v1.0.0
type ClientData struct {
ID string `json:"id"`
Name string `json:"name"`
LogoURL string `json:"logo_url,omitempty"`
}
ClientData is a minimal representation of an Auth0 Client as defined in the management API. This is used within the branding machinery to populate the tenant data.
type DataJSONHandler ¶ added in v1.34.0
type DataJSONHandler struct {
// contains filtered or unexported fields
}
DataJSONHandler handles the --data flag for create/update commands.
func NewDataJSONHandler ¶ added in v1.34.0
func NewDataJSONHandler(c *cli) (*DataJSONHandler, error)
NewDataJSONHandler creates a new data JSON handler.
func (*DataJSONHandler) ReadAndValidate ¶ added in v1.34.0
func (h *DataJSONHandler) ReadAndValidate(inputStr, method, path string) (json.RawMessage, error)
ReadAndValidate reads the JSON input and validates it against the schema, returning the raw bytes so the caller can send them to the API unchanged (no SDK struct round-trip that would drop fields or apply omitempty).
type DetectionResult ¶ added in v1.31.0
type DetectionResult struct {
Framework string
Type string // "spa" | "regular" | "native".
BuildTool string // "vite" | "maven" | "gradle" | "composer" | "" (NA).
BundleID string // Package/bundle ID for native apps (e.g. "com.example.myapp"); empty if not found.
Detected bool // True if any signal file matched.
AmbiguousFrameworks []string // Set when >1 package.json dep matched.
}
DetectionResult holds the values resolved by scanning the working directory. Fields are empty/zero when not detected. AmbiguousFrameworks is populated when multiple package.json deps match and the framework cannot be determined uniquely.
func DetectProject ¶ added in v1.31.0
func DetectProject(dir string) DetectionResult
DetectProject scans dir for framework signal files and returns a DetectionResult. Rules follow the priority order from the spec: config files beat package.json scanning.
type Flag ¶ added in v0.2.3
type Flag struct {
Name string
LongForm string
ShortForm string
Help string
IsRequired bool
AlwaysPrompt bool
AlsoKnownAs []string
}
func (*Flag) AskIntSlice ¶ added in v1.12.0
func (*Flag) AskPassword ¶ added in v0.7.0
func (*Flag) AskPasswordU ¶ added in v0.7.0
func (Flag) GetIsRequired ¶ added in v0.3.0
func (*Flag) OpenEditor ¶ added in v0.10.2
func (*Flag) OpenEditorU ¶ added in v0.10.2
func (*Flag) OpenEditorW ¶ added in v0.10.2
func (*Flag) RegisterBool ¶ added in v0.3.0
func (*Flag) RegisterBoolU ¶ added in v0.3.0
func (*Flag) RegisterInt ¶ added in v0.3.0
func (*Flag) RegisterIntSlice ¶ added in v1.12.0
func (*Flag) RegisterIntU ¶ added in v0.3.0
func (*Flag) RegisterString ¶ added in v0.2.3
func (*Flag) RegisterStringArray ¶ added in v1.33.0
func (*Flag) RegisterStringArrayU ¶ added in v1.33.0
func (*Flag) RegisterStringMap ¶ added in v0.9.0
func (*Flag) RegisterStringMapU ¶ added in v0.9.0
func (*Flag) RegisterStringSlice ¶ added in v0.2.5
func (*Flag) RegisterStringSliceU ¶ added in v0.2.5
func (*Flag) RegisterStringU ¶ added in v0.2.3
type LoginInputs ¶ added in v1.0.0
type SetupInputs ¶ added in v1.31.0
type SetupInputs struct {
Name string
App bool
Type string
Framework string
BuildTool string
Port int
BundleID string // Package/bundle ID for native apps, populated from detection.
CallbackURL string
LogoutURL string
WebOriginURL string
API bool
Identifier string
SigningAlg string
Scopes string
TokenLifetime string
OfflineAccess bool
LinkedAppID string // Client ID of an existing app to link to the API.
MetaData map[string]interface{}
}
SetupInputs holds the user-provided inputs for the setup command.
type TemplateData ¶ added in v1.0.0
type TemplateData struct {
Filename string
Clients []ClientData
PrimaryColor string
BackgroundColor string
LogoURL string
TenantName string
Body string
Experience string
}
TemplateData contains all the variables we project onto our embedded go template. These variables largely resemble the same ones in the auth0 branding template.
Source Files
¶
- actions.go
- actions_embed.go
- actions_modules.go
- actions_modules_versions.go
- acul.go
- acul_app_scaffolding.go
- acul_config.go
- acul_dev.go
- acul_screen_scaffolding.go
- agent_detection.go
- api.go
- apis.go
- apps.go
- arguments.go
- attack_protection.go
- attack_protection_bot_detection.go
- attack_protection_breached_password_detection.go
- attack_protection_brute_force_protection.go
- attack_protection_suspicious_ip_throttling.go
- cli.go
- client_grants.go
- client_grants_organizations.go
- commands.go
- completion.go
- custom_domains.go
- data_json.go
- doc-gen.go
- email.go
- email_provider.go
- email_templates.go
- error_enhancer.go
- event_streams.go
- event_streams_subscribe.go
- flags.go
- flows.go
- flows_vault.go
- input.go
- invoker_metadata.go
- ips.go
- log_streams.go
- log_streams_datadog.go
- log_streams_event_bridge.go
- log_streams_event_grid.go
- log_streams_http.go
- log_streams_splunk.go
- log_streams_sumo.go
- login.go
- logout.go
- logs.go
- management.go
- network_acl.go
- organizations.go
- phone.go
- phone_provider.go
- picker_options.go
- prompts_custom_text.go
- query_json.go
- quickstart_detect.go
- quickstarts.go
- refresh_tokens.go
- roles.go
- roles_permissions.go
- root.go
- rules.go
- rules_embed.go
- schema.go
- sessions.go
- skills.go
- templates.go
- tenant_settings.go
- tenants.go
- terraform.go
- terraform_fetcher.go
- test.go
- token_exchange.go
- universal_login.go
- universal_login_customize.go
- universal_login_templates.go
- users.go
- users_blocks.go
- users_refresh_tokens.go
- users_roles.go
- users_sessions.go
- utils_shared.go