#include "tlpp-core.th" #define _rest_oAuth2_secret_ 'Tlp#S3cre7@' #define _rest_oAuth2_access_expires 3600 #define _rest_oAuth2_refresh_expires Date()+1 #define _rest_oAuth2_client_id '7LpPC0r3' #define _rest_oAuth2_user '7lpPC0r3o@u7h2' #define _rest_oAuth2_password 'p@s5w0rD&7LpPC0r3' Function u_paramsProvider(jParams) local jTlppParams := {; "client_id" : _rest_oAuth2_client_id ,; "client_secret" : _rest_oAuth2_secret_ ,; "username" : _rest_oAuth2_user ,; "password" : _rest_oAuth2_password ,; "access_expires" : _rest_oAuth2_access_expires ,; "refresh_expires" : _rest_oAuth2_refresh_expires ,; "grant_type" : "password" ; } local aProps := jTlppParams:GetNames() aEval(aProps, {|x,y| iIf(!(jParams:hasProperty(x)), jParams[x] := jTlppParams[x],'')}) Return .T.