-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
It can take a while to sort this kind of thing out when no example is at hand, as each API tends to handle its tokens a bit differently.
The general form of the token request for a password credentials request for ION is:
const jwkConfig = {
"ti": "...",
"cn": "...",
"dt": "...",
"ci": "...",
"cs": "...",
"iu": "...",
"pu": "...",
"saak": "...",
"sask": "...",
}
try {
const BaseUrl = "https://mingle-sso.inforcloudsuite.com:443"
const tokenResults = await axios.post(`${BaseUrl}/RPHLLC_TRN/as/token.oauth2`,
{
grant_type: 'password',
username: jwkConfig.saak,
password: jwkConfig.sask,
scope: "",
},
{
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
auth: {
username: jwkConfig.ci,
password: jwkConfig.cs
},
});
}
catch (e) {
console.warn(e.status, e.message, e.response?.data)
}
Metadata
Metadata
Assignees
Labels
No labels