From 7c35d8e11cf6d3b5ebcc4847c4bd636ab9dae44f Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Tue, 24 May 2011 08:04:06 +0000 Subject: [PATCH] Auth_Simple: Add getAuthSource()-function. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2846 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Auth/BWC.php | 10 ++++++++++ lib/SimpleSAML/Auth/Simple.php | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/lib/SimpleSAML/Auth/BWC.php b/lib/SimpleSAML/Auth/BWC.php index 538ca9044..2866f11c2 100644 --- a/lib/SimpleSAML/Auth/BWC.php +++ b/lib/SimpleSAML/Auth/BWC.php @@ -59,6 +59,16 @@ class SimpleSAML_Auth_BWC extends SimpleSAML_Auth_Simple { } + /** + * Retrieve the implementing authentication source. + * + * @return NULL There is never an authentication source behind this class. + */ + public function getAuthSource() { + return NULL; + } + + /** * Start a login operation. * diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php index ec08f29d6..0041dddb9 100644 --- a/lib/SimpleSAML/Auth/Simple.php +++ b/lib/SimpleSAML/Auth/Simple.php @@ -28,6 +28,16 @@ class SimpleSAML_Auth_Simple { } + /** + * Retrieve the implementing authentication source. + * + * @return SimpleSAML_Auth_Source The authentication source. + */ + public function getAuthSource() { + return SimpleSAML_Auth_Source::getById($this->authSource); + } + + /** * Check if the user is authenticated. * -- GitLab