File tree Expand file tree Collapse file tree
app/client/src/pages/Editor/DataSourceEditor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -683,6 +683,21 @@ class DatasourceRestAPIEditor extends React.Component<Props> {
683683 isRequired : false ,
684684 } ) }
685685 </ FormInputContainer >
686+ { _ . get ( formData . authentication , "grantType" ) ===
687+ GrantType . AuthorizationCode && (
688+ < FormInputContainer
689+ data-location-id = { btoa ( "authentication.expiresIn" ) }
690+ >
691+ { this . renderInputTextControlViaFormControl ( {
692+ configProperty : "authentication.expiresIn" ,
693+ label : "Authorization expires in (seconds)" ,
694+ placeholderText : "3600" ,
695+ dataType : "NUMBER" ,
696+ encrypted : false ,
697+ isRequired : false ,
698+ } ) }
699+ </ FormInputContainer >
700+ ) }
686701 < FormInputContainer
687702 data-location-id = { btoa ( "authentication.isAuthorizationHeader" ) }
688703 >
@@ -870,17 +885,6 @@ class DatasourceRestAPIEditor extends React.Component<Props> {
870885 false ,
871886 ) }
872887 </ FormInputContainer >
873- < FormInputContainer data-location-id = { btoa ( "authentication.expiresIn" ) } >
874- { this . renderInputTextControlViaFormControl ( {
875- configProperty : "authentication.expiresIn" ,
876- label : "Authorization expires in (seconds)" ,
877- placeholderText : "3600" ,
878- dataType : "NUMBER" ,
879- encrypted : false ,
880- isRequired : false ,
881- } ) }
882- </ FormInputContainer >
883-
884888 { ! _ . get ( formData . authentication , "isAuthorizationHeader" , true ) &&
885889 this . renderOauth2CommonAdvanced ( ) }
886890 </ >
You can’t perform that action at this time.
0 commit comments