From 7f3f502f77c2e4219fc7fae1e3add8d0a1c6eefc Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Fri, 28 Aug 2009 07:47:31 +0000
Subject: [PATCH] SimpleSAML_Auth_Source: Add getSources()-function.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1725 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Auth/Source.php | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php
index 27803ebb0..413f68560 100644
--- a/lib/SimpleSAML/Auth/Source.php
+++ b/lib/SimpleSAML/Auth/Source.php
@@ -248,6 +248,20 @@ abstract class SimpleSAML_Auth_Source {
 		call_user_func($callback, $callbackState);
 	}
 
+
+	/**
+	 * Retrieve list of authentication sources.
+	 *
+	 * @param string $authId  The authentication source identifier.
+	 * @return array  The id of all authentication sources.
+	 */
+	public static function getSources() {
+
+		$config = SimpleSAML_Configuration::getOptionalConfig('authsources.php');
+
+		return $config->getOptions();
+	}
+
 }
 
 ?>
\ No newline at end of file
-- 
GitLab