added user api

This commit is contained in:
2021-08-18 09:56:08 +05:30
parent 1c99574b09
commit e07d235b15
25 changed files with 71 additions and 74 deletions

View File

@ -60,21 +60,26 @@ const TheContent = () => {
// //console.log(jdata.attributes[0].values[0]);
//return true;
const cookies = new Cookies();
const shib = cookies.get('_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468')
if (shib !== undefined) {
fetchSession().then(() => {
if (SsoSession !== null) {
fetchUser().then(() => {
console.log('requesting user data');
console.log(UserData);
return true;
});
}
});
} else {
return null;
}
// const cookies = new Cookies();
// const shib = cookies.get('_shibsession_64656661756c7468747470733a2f2f66736273736f2e73756d6173656e2e6e65742f73686962626f6c657468')
// if (shib !== undefined) {
// fetchSession().then(() => {
// if (SsoSession !== null) {
// fetchUser().then(() => {
// console.log('requesting user data');
// console.log(UserData);
// return true;
// });
// }
// });
// } else {
// return null;
// }
fetchUser().then(() => {
console.log('requesting user data');
console.log(UserData);
return true;
});
}
return (