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

Method getConnReqUsername

internal/cli/users.go:1045–1058  ·  view source on GitHub ↗

This is a workaround to get the requires_username field nested inside Options field.

(ctx context.Context, s string)

Source from the content-addressed store, hash-verified

1043
1044// This is a workaround to get the requires_username field nested inside Options field.
1045func (c *cli) getConnReqUsername(ctx context.Context, s string) *bool {
1046 conn, err := c.api.Connection.ReadByName(ctx, s)
1047 if err != nil {
1048 fmt.Println(err)
1049 }
1050 res := fmt.Sprintln(conn.Options)
1051
1052 opts := &management.ConnectionOptions{}
1053 if err := json.Unmarshal([]byte(res), &opts); err != nil {
1054 fmt.Println(err)
1055 }
1056
1057 return opts.RequiresUsername
1058}
1059
1060func (c *cli) userImportEditorHint() {
1061 c.renderer.Infof("%s Once you close the editor, the user(s) will be imported. To cancel, CTRL+C.", ansi.Faint("Hint:"))

Callers 3

createUserCmdFunction · 0.80
showUserCmdFunction · 0.80
updateUserCmdFunction · 0.80

Calls 1

ReadByNameMethod · 0.65

Tested by

no test coverage detected