Testing Instructions for SSO
First, you will need to pick an Organization that has an SSO provider configured. You should be able to find this in Organization Management (tag: HEI-SSO). These organizations can also be listed via REST API (see the following example URL):
https://services-sandbox.sheerid.com/rest/0.5/organization?type=UNIVERSITY&tag=HEI-SSO&country=GB
Use the following curl command as an example to test SSO verification using the sandbox.
$ curl -H "Authorization: Bearer $TOKEN" -d _affiliationTypes=FACULTY -d organizationType=UNIVERSITY -d FIRST_NAME=Sam -d LAST_NAME=Doe -d BIRTH_DATE=1999-12-01 -d EMAIL=$(uuidgen)@example.com -d organizationId=191982 https://services-sandbox.sheerid.com/rest/0.5/verification
Next, we will use the following curl command to check to make sure the result = null for the verification by using the requestId from the previous curl response.
$ curl -H "Authorization: Bearer $TOKEN" https://services-sandbox.sheerid.com/rest/0.5/verification/${requestId}
Next, in a browser navigate to the following url using the requestId that was returned in the response from the command above.
https://services-sandbox.sheerid.com/rest/0.5/verification/sso/${requestId}
The page that opens up will have instructions on how to log in etc. If you run the previous curl command again you will notice that the status=’PENDING’ and the result=null. This page uses cookies to store the SSO session token so if you wish to do multiple verifications you will need to clear cookies between tests or use the incognito browser.
If you log in with valid credentials (provided on the login page) that match the affiliation type(s) being verified (see table below), you will see the following message ‘Verification Complete’. Now if you re-run the previous curl command you will notice that the status=’COMPLETE’ and the result=’true’
If you log in with valid credentials (provided on the login page) that do not match the affiliation type(s) being verified (see table below), you will see the following message ‘Verification Complete’. Now if you re-run the previous curl command you will notice that the status=’COMPLETE’ and the result=’false’
Username |
Affiliations |
myself |
Teacher, Student |
alterego |
Student |
superego |
Teacher |