Revision: 1998
Author: olavmrk
Date: Wed Nov 18 00:15:17 2009
Log: Auth_Simple: Add login()-function.
http://code.google.com/p/simplesamlphp/source/detail?r=1998
Modified:
/trunk/lib/SimpleSAML/Auth/Simple.php
=======================================
--- /trunk/lib/SimpleSAML/Auth/Simple.php Wed Nov 18 00:15:05 2009
+++ /trunk/lib/SimpleSAML/Auth/Simple.php Wed Nov 18 00:15:17 2009
@@ -54,11 +54,7 @@
* current page.
*
* This function accepts an array $params, which controls some parts of
- * the authentication. The accepted parameters depends on the
authentication
- * source being used. Some parameters are generic:
- * - 'KeepPost': If the current request is a POST request, keep the
POST
- * data until after the authentication.
- * - 'ReturnTo': The URL the user should be returned to after
authentication.
+ * the authentication. See the login()-function for a description.
*
* @param array $params Various options to the authentication request.
*/
@@ -70,6 +66,26 @@
/* Already authenticated. */
return;
}
+
+ $this->login($params);
+ }
+
+
+ /**
+ * Start an authentication process.
+ *
+ * This function never returns.
+ *
+ * This function accepts an array $params, which controls some parts of
+ * the authentication. The accepted parameters depends on the
authentication
+ * source being used. Some parameters are generic:
+ * - 'KeepPost': If the current request is a POST request, keep the
POST
+ * data until after the authentication.
+ * - 'ReturnTo': The URL the user should be returned to after
authentication.
+ *
+ * @param array $params Various options to the authentication request.
+ */
+ public function login(array $params = array()) {
if (array_key_exists('KeepPost', $params)) {
$keepPost = (bool)$params['KeepPost'];
@@ -96,6 +112,7 @@
$params[SimpleSAML_Auth_State::RESTART] = $restartURL;
SimpleSAML_Auth_Default::initLogin($this->authSource,
$returnTo, NULL,
$params);
+ assert('FALSE');
}
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=.