Justin Xayarinh
03/15/2024, 8:33 PMJustin Xayarinh
03/15/2024, 8:34 PMJustin Xayarinh
03/15/2024, 8:35 PMlet tempURL = `${this.getUrl()}${resource}?password={${body.client_secret}}`;
log.debug('BEFORE', tempURL);
if (credentials) {
tempURL = https.createSecureString({
input: `${this.getUrl()}${resource}?password={${body.client_secret}}`
});
}
body = JSON.stringify(body);
log.debug('PARAMETERSBODY', body);
log.debug('POSTCREDENTIALS', credentials);
log.debug('tempURL', tempURL)
const response = <http://https.post|https.post>({
url: tempURL,
body: body,
credentials: [body.client_secret],
headers: {
'Content-Type': 'application/json',
'Accept':'application/json',
'password': body.client_secret
}
});
Justin Xayarinh
03/15/2024, 8:35 PMbattk
03/15/2024, 9:00 PMbattk
03/15/2024, 9:01 PMbattk
03/15/2024, 9:02 PMbattk
03/15/2024, 9:02 PMbattk
03/15/2024, 9:03 PMJustin Xayarinh
03/15/2024, 9:03 PMbattk
03/15/2024, 9:03 PM'password': body.client_secret
isnt actually being replacedJustin Xayarinh
03/15/2024, 9:03 PMbattk
03/15/2024, 9:04 PMbattk
03/15/2024, 9:04 PMcredentials: [body.client_secret],
Justin Xayarinh
03/15/2024, 9:05 PMlet postBODY = {
client_id: "CLIENT_SCRET_VALUE",
client_secret: "{GUID_VALUE}",
code: "CODE_VALUE"
}
battk
03/15/2024, 9:06 PMbattk
03/15/2024, 9:06 PMbattk
03/15/2024, 9:07 PMbattk
03/15/2024, 9:07 PMbattk
03/15/2024, 9:08 PMJustin Xayarinh
03/15/2024, 9:42 PMbattk
03/15/2024, 9:44 PMbattk
03/15/2024, 9:45 PMJustin Xayarinh
03/15/2024, 9:46 PMJustin Xayarinh
03/15/2024, 9:46 PMJustin Xayarinh
03/15/2024, 9:46 PMJustin Xayarinh
03/15/2024, 9:47 PMbattk
03/15/2024, 9:49 PMbattk
03/15/2024, 9:50 PMbattk
03/15/2024, 9:50 PMJustin Xayarinh
03/15/2024, 9:52 PMJustin Xayarinh
03/15/2024, 9:52 PMbattk
03/15/2024, 9:57 PMbattk
03/15/2024, 9:57 PMbattk
03/15/2024, 9:57 PMJustin Xayarinh
03/16/2024, 3:40 AMform.addCredentialField({
id: 'password',
label: 'App Secret',
restrictToScriptIds: ['customscript_test_script'],
restrictToCurrentUser: false,
restrictToDomains: ['<http://sandbox.dev.clover.com|sandbox.dev.clover.com>', '<http://api.clover.com|api.clover.com>']
});
battk
03/16/2024, 5:09 AMbattk
03/16/2024, 5:09 AMbattk
03/16/2024, 5:10 AMbattk
03/16/2024, 5:10 AM