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

Function appsSessionTransferShowCmd

internal/cli/apps.go:1165–1210  ·  view source on GitHub ↗
(cli *cli)

Source from the content-addressed store, hash-verified

1163}
1164
1165func appsSessionTransferShowCmd(cli *cli) *cobra.Command {
1166 var inputs struct {
1167 ID string
1168 }
1169
1170 cmd := &cobra.Command{
1171 Use: "show",
1172 Args: cobra.MaximumNArgs(1),
1173 Short: "Show session transfer settings for an app",
1174 Example: `auth0 apps session-transfer show
1175 auth0 apps session-transfer show <app-id>
1176 auth0 apps session-transfer show <app-id> --json`,
1177 RunE: func(cmd *cobra.Command, args []string) error {
1178 if len(args) == 0 {
1179 err := appID.Pick(cmd, &inputs.ID, cli.appPickerOptions())
1180 if err != nil {
1181 return err
1182 }
1183 } else {
1184 inputs.ID = args[0]
1185 }
1186
1187 var client *management.Client
1188 if err := ansi.Waiting(func() error {
1189 var err error
1190 client, err = cli.api.Client.Read(cmd.Context(), inputs.ID)
1191 return err
1192 }); err != nil {
1193 return fmt.Errorf("failed to read application: %w", err)
1194 }
1195
1196 if client.SessionTransfer == nil {
1197 cli.renderer.Infof("No session transfer settings configured for app %s", ansi.Faint(inputs.ID))
1198 return nil
1199 }
1200
1201 cli.renderer.SessionTransferShow(client)
1202
1203 return nil
1204 },
1205 }
1206
1207 cmd.Flags().BoolVar(&cli.json, "json", false, "Output in json format.")
1208 cmd.Flags().BoolVar(&cli.jsonCompact, "json-compact", false, "Output in compact json format.")
1209 return cmd
1210}
1211
1212func appsSessionTransferUpdateCmd(cli *cli) *cobra.Command {
1213 var inputs struct {

Callers 1

appsSessionTransferCmdFunction · 0.85

Calls 8

WaitingFunction · 0.92
FaintFunction · 0.92
appPickerOptionsMethod · 0.80
ErrorfMethod · 0.80
InfofMethod · 0.80
SessionTransferShowMethod · 0.80
ReadMethod · 0.65
PickMethod · 0.45

Tested by

no test coverage detected