File tree 2 files changed +27
-1
lines changed 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -1065,6 +1065,14 @@ func appsSessionTransferUpdateCmd(cli *cli) *cobra.Command {
1065
1065
return fmt .Errorf ("failed to find application with ID %q: %w" , inputs .ID , err )
1066
1066
}
1067
1067
1068
+ if current .SessionTransfer == nil {
1069
+ current .SessionTransfer = & management.SessionTransfer {
1070
+ CanCreateSessionTransferToken : auth0 .Bool (false ),
1071
+ AllowedAuthenticationMethods : & []string {},
1072
+ EnforceDeviceBinding : auth0 .String ("ip" ),
1073
+ }
1074
+ }
1075
+
1068
1076
if err := appSTCanCreateToken .AskBoolU (cmd , & inputs .CanCreateToken , current .SessionTransfer .CanCreateSessionTransferToken ); err != nil {
1069
1077
return err
1070
1078
}
Original file line number Diff line number Diff line change @@ -292,6 +292,24 @@ tests:
292
292
contains :
293
293
- " Successfully set the default application to"
294
294
295
- 039 - given a test app, it successfully deletes the app :
295
+ 039 - it successfully updates the session-transfer of an application :
296
+ command : auth0 apps session-transfer update $(./test/integration/scripts/get-app-id.sh) --can-create-token=true --allowed-auth-methods=cookie,query --enforce-device-binding=asn --json
297
+ exit-code : 0
298
+ stdout :
299
+ json :
300
+ can_create_session_transfer_token : " true"
301
+ allowed_authentication_methods : " [cookie query]"
302
+ enforce_device_binding : asn
303
+
304
+ 040 - it successfully renders the session-transfer of an application :
305
+ command : auth0 apps session-transfer show $(./test/integration/scripts/get-app-id.sh)
306
+ exit-code : 0
307
+ stdout :
308
+ contains :
309
+ - CAN CREATE TOKEN ✓
310
+ - ALLOWED METHODS cookie, query
311
+ - DEVICE BINDING asn
312
+
313
+ 041 - given a test app, it successfully deletes the app :
296
314
command : auth0 apps delete $(./test/integration/scripts/get-app-id.sh) --force
297
315
exit-code : 0
You can’t perform that action at this time.
0 commit comments