Last active
September 2, 2016 03:24
-
-
Save duhaime/eda9506ac67e37b418e59fbb9ed07b8a to your computer and use it in GitHub Desktop.
Yale CAS Auth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To authenticate users with Yale's CAS server, one can first send a request to the following endpoint: | |
| `https://secure.its.yale.edu/cas?service=http%3A%2F%2Fgoogle.com` | |
| The `service` query param specifies the application that's requesting the authentication. | |
| This request will redirect control back to the application with the following url: | |
| `https://www.google.com/?ticket=ST-6606719-A9AjXY2yXrsKw0b7oC4e-vmssoprdapp01` | |
| Using the `ticket` query param, one can then validate the user against the CAS authentication server with the following request: | |
| `https://secure.its.yale.edu/cas/serviceValidate?ticket=ST-6606719-A9AjXY2yXrsKw0b7oC4e-vmssoprdapp01&service=http%3A%2F%2Fgoogle.com` | |
| If the ticket is legitimate, then this request will return the user's Yale CAS id in the following XML: | |
| ``` | |
| <html><head><script type="text/javascript" src="chrome-extension://aadgmnobpdmgmigaicncghmmoeflnamj/ng-inspector.js"></script></head><body cz-shortcut-listen="true"><cas:serviceresponse xmlns:cas="http://www.yale.edu/tp/cas"> | |
| <cas:authenticationsuccess> | |
| <cas:user>ded34</cas:user> | |
| </cas:authenticationsuccess> | |
| </cas:serviceresponse> | |
| </body></html> | |
| ``` | |
| Else it will return an error in similar XML (though sans a cas:user field). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment