diff --git a/config-templates/authmemcookie.php b/config-templates/authmemcookie.php index 036e8c2e6767cf2d888369865366d8d2d8576440..47509494cf7ba69a26d591e76cea93d3b5d0ffd8 100644 --- a/config-templates/authmemcookie.php +++ b/config-templates/authmemcookie.php @@ -6,15 +6,6 @@ $config = array( - /* - * What type of login Auth MemCookie will use. - * Can be either 'authsource', 'saml2' or 'shib13'. - * - * For backwards compatibility, the default value if unset is 'saml2'. - * New installations should use 'authsource'. - */ - 'loginmethod' => 'authsource', - /* * The authentication source that should be used. * diff --git a/lib/SimpleSAML/AuthMemCookie.php b/lib/SimpleSAML/AuthMemCookie.php index 2ce0b74d67e8859fa55655df060b42fe16f31ccc..80fd00a5048107f4de82a2fe3ecc2c392026c227 100644 --- a/lib/SimpleSAML/AuthMemCookie.php +++ b/lib/SimpleSAML/AuthMemCookie.php @@ -43,26 +43,6 @@ class SimpleSAML_AuthMemCookie { } - /** - * Retrieve the login method which should be used to authenticate the user. - * - * @return string The login type which should be used for Auth MemCookie. - */ - public function getLoginMethod() { - $loginMethod = $this->amcConfig->getString('loginmethod', 'saml2'); - $supportedLogins = array( - 'authsource', - 'saml2', - 'shib13', - ); - if(!in_array($loginMethod, $supportedLogins, TRUE)) { - throw new Exception('Configuration option \'loginmethod\' contains an invalid value.'); - } - - return $loginMethod; - } - - /** * Retrieve the authentication source that should be used to authenticate the user. * diff --git a/www/authmemcookie.php b/www/authmemcookie.php index b385400c9031b63fa36625960da7b64cb6e5bf3d..dc52fc2c3eb02157514d4280fe2dce49ba03b0cd 100644 --- a/www/authmemcookie.php +++ b/www/authmemcookie.php @@ -24,24 +24,8 @@ try { /* Load Auth MemCookie configuration. */ $amc = SimpleSAML_AuthMemCookie::getInstance(); - /* Determine the method we should use to authenticate the user and retrieve the attributes. */ - $loginMethod = $amc->getLoginMethod(); - switch($loginMethod) { - case 'authsource': - /* The default now. */ - $sourceId = $amc->getAuthSource(); - $s = new SimpleSAML_Auth_Simple($sourceId); - break; - case 'saml2': - $s = new SimpleSAML_Auth_BWC('saml2/sp/initSSO.php', 'saml2'); - break; - case 'shib13': - $s = new SimpleSAML_Auth_BWC('shib13/sp/initSSO.php', 'shib13'); - break; - default: - /* Should never happen, as the login method is checked in the AuthMemCookie class. */ - throw new Exception('Invalid login method.'); - } + $sourceId = $amc->getAuthSource(); + $s = new SimpleSAML_Auth_Simple($sourceId); /* Check if the user is authorized. We attempt to authenticate the user if not. */ $s->requireAuth();