|
677 | 677 | "password": null,
|
678 | 678 | "accessToken": null,
|
679 | 679 | "ticket": null,
|
680 |
| - "cookie": null |
| 680 | + "cookie": null, |
| 681 | + "ticketMaxAge": null |
681 | 682 | };
|
682 | 683 | Gitana.copyKeepers(config, Gitana.loadDefaultConfig());
|
683 | 684 | Gitana.copyKeepers(config, settings);
|
|
690 | 691 | {
|
691 | 692 | var platform = this;
|
692 | 693 |
|
| 694 | + // params to /auth/info |
| 695 | + var authInfoParams = {}; |
| 696 | + if (config.ticketMaxAge) { |
| 697 | + authInfoParams.ticketMaxAge = config.ticketMaxAge; |
| 698 | + } |
| 699 | + |
693 | 700 | // we provide a fallback if no flow type is specified, using "password" flow with guest/guest
|
694 | 701 | if (!config.code && !config.username && !config.accessToken && !config.cookie && !config.ticket)
|
695 | 702 | {
|
|
709 | 716 | driver.currentPlatform = null;
|
710 | 717 |
|
711 | 718 | // fetch the auth info
|
712 |
| - driver.gitanaGet("/auth/info", {}, function(response) { |
| 719 | + driver.gitanaGet("/auth/info", authInfoParams, function(response) { |
713 | 720 |
|
714 | 721 | var authInfo = new Gitana.AuthInfo(response);
|
715 | 722 | driver.setAuthInfo(authInfo);
|
|
749 | 756 | driver.currentPlatform = null;
|
750 | 757 |
|
751 | 758 | // retrieve auth info and plug into the driver
|
752 |
| - driver.gitanaGet("/auth/info", {}, function(response) { |
| 759 | + driver.gitanaGet("/auth/info", authInfoParams, function(response) { |
753 | 760 | var authInfo = new Gitana.AuthInfo(response);
|
754 | 761 | driver.setAuthInfo(authInfo);
|
755 | 762 |
|
|
788 | 795 | driver.currentPlatform = null;
|
789 | 796 |
|
790 | 797 | // fetch the auth info
|
791 |
| - driver.gitanaGet("/auth/info", {}, function(response) { |
| 798 | + driver.gitanaGet("/auth/info", authInfoParams, function(response) { |
792 | 799 |
|
793 | 800 | var authInfo = new Gitana.AuthInfo(response);
|
794 | 801 | driver.setAuthInfo(authInfo);
|
|
827 | 834 | driver.currentPlatform = null;
|
828 | 835 |
|
829 | 836 | // fetch the auth info
|
830 |
| - driver.gitanaGet("/auth/info", {}, function(response) { |
| 837 | + driver.gitanaGet("/auth/info", authInfoParams, function(response) { |
831 | 838 |
|
832 | 839 | var authInfo = new Gitana.AuthInfo(response);
|
833 | 840 | driver.setAuthInfo(authInfo);
|
|
867 | 874 | driver.currentPlatform = null;
|
868 | 875 |
|
869 | 876 | // fetch the auth info
|
870 |
| - driver.gitanaGet("/auth/info", {}, function(response) { |
| 877 | + driver.gitanaGet("/auth/info", authInfoParams, function(response) { |
871 | 878 |
|
872 | 879 | var authInfo = new Gitana.AuthInfo(response);
|
873 | 880 | driver.setAuthInfo(authInfo);
|
|
0 commit comments