Source of file SSPAuthenticator.php
Size: 0,972 Bytes - Last Modified: 2022-02-21T10:01:43+00:00
/var/www/docs.ssmods.com/process/src/code/SSPAuthenticator.php
12345678910111213141516171819202122232425262728293031323334 | <?php /** * Extends the SimpleSAML_Auth_Simple class to allow custom authentication logic depending on * the authentication source * * @package silverstripe-ssp * @author Anton Smith <anton.smith@op.ac.nz> */ abstract class SSPAuthenticator extends SimpleSAML_Auth_Simple { /** * Provide custom Silverstripe authentication logic for a SimpleSAMLphp authentication source * to authenticate a user */ abstract public function authenticate(); /** * When login is complete, save the SSPAuthentication object to the session */ final public function loginComplete() { //Use the same session as SimpleSAMLphp to avoid session state loss Session::start(SimpleSAML_Session::getInstance()->getSessionId()); Session::set('ssp_current_auth_source', $this->getAuthSource()->getAuthId()); Session::set('ssp_current_auth_class', get_class($this)); Session::save(); } } |