Make oidc work with respondents auth with guid only: Difference between revisions
From Catglobe Wiki
More actions
Nguyenduyan (talk | contribs) Created page with "File:Oidc_authR.jpg Category:Guides" |
Nguyenduyan (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
If we want to automatically link respondents to an external site (oidc_site) that uses authentication from Catglobe, without making them log in. Here's how we can do: | |||
Input the cgscript on gateway workflow or on the questionnaire dummy: | |||
<source lang="javascript"> | |||
//Script for gateway | |||
return oidc_site + "authentication/login?respondent=" + User_getQasUser().ResourceGuid + "&respondent_secret=" + QAS_getCurrentQAS().AccessCode; | |||
//Script for dummy | |||
sendToUrl(oidc_site + "authentication/login?respondent=" + User_getQasUser().ResourceGuid + "&respondent_secret=" + QAS_getCurrentQAS().AccessCode); | |||
</source> | |||
Then send invitation mail to respondents. When a respondent clicks on survey link in mail, they'll be redirected to external site and automatically logged in. | |||
Here's the flow diagram, to shows how this works | |||
[[File:Oidc_authR.jpg]] | [[File:Oidc_authR.jpg]] | ||
[[Category:Guides]] | [[Category:Guides]] |
Revision as of 10:21, 3 April 2025
If we want to automatically link respondents to an external site (oidc_site) that uses authentication from Catglobe, without making them log in. Here's how we can do:
Input the cgscript on gateway workflow or on the questionnaire dummy:
//Script for gateway
return oidc_site + "authentication/login?respondent=" + User_getQasUser().ResourceGuid + "&respondent_secret=" + QAS_getCurrentQAS().AccessCode;
//Script for dummy
sendToUrl(oidc_site + "authentication/login?respondent=" + User_getQasUser().ResourceGuid + "&respondent_secret=" + QAS_getCurrentQAS().AccessCode);
Then send invitation mail to respondents. When a respondent clicks on survey link in mail, they'll be redirected to external site and automatically logged in.
Here's the flow diagram, to shows how this works