Download php-webauth.zip [insert link]
To get started:
- Sign in to eService, www.eid.colostate.edu, and set the Web Auth Return Destination value
https://[DestinationUrl]/result.php
- Locate and change the eServiceToken and Submit properties to your assigned eService Token and desired submit button (see the code’s comments for more information) in Login method of webauth.php
$this->eServiceToken = '1234....';
$this->Submit = "Default";
- Add your own custom validation logic, session keys, and / or redirection in the Result method of webauth.php
- Run your tests. Consider using the SeleniumIDE plugin for FireFox; it will make testing easier and save a lot of time.
That’s it! To use php web auth with an existing project:
- Copy __includes.php and webauth.php into your project.
- On the login script, instantiate the webauth, call the Login method and echo out the ResponseString:
$webAuth = new WebAuth();
$webAuth = $webAuth->Login();
echo $webAuth->ResponseString
- Add your custom validation logic, session keys and / or redirection in the Result method of webaut.php