MCPcopy Create free account
hub / github.com/auth0/auth0-cli / validateAPIIdentifier

Function validateAPIIdentifier

internal/cli/quickstarts.go:1416–1425  ·  view source on GitHub ↗

validateAPIIdentifier returns an error if identifier is not a valid http:// or https:// URL.

(identifier string)

Source from the content-addressed store, hash-verified

1414
1415// validateAPIIdentifier returns an error if identifier is not a valid http:// or https:// URL.
1416func validateAPIIdentifier(identifier string) error {
1417 u, err := url.ParseRequestURI(identifier)
1418 if err != nil {
1419 return fmt.Errorf("invalid API identifier %q: must be a valid URI (e.g. https://my-api)", identifier)
1420 }
1421 if u.Scheme == "" || u.Host == "" {
1422 return fmt.Errorf("invalid API identifier %q: must include a scheme and host (e.g. https://my-api)", identifier)
1423 }
1424 return nil
1425}
1426
1427func generateClient(input SetupInputs, reqParams auth0.RequestParams) (*management.Client, error) {
1428 if input.Name == "" {

Callers 2

collectAPIInputsFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by 1