From 00c626675952c5587811277ae188cc1e095d573d Mon Sep 17 00:00:00 2001 From: Tyler Antonio <tantonio@ualberta.ca> Date: Mon, 20 Jul 2015 11:12:29 -0600 Subject: [PATCH] Updates to documentation --- docs/simplesamlphp-metadata-pdostoragehandler.txt | 15 +++++---------- .../Metadata/MetaDataStorageHandlerPdo.php | 9 +++++---- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/simplesamlphp-metadata-pdostoragehandler.txt b/docs/simplesamlphp-metadata-pdostoragehandler.txt index 572aee522..c7c260a17 100644 --- a/docs/simplesamlphp-metadata-pdostoragehandler.txt +++ b/docs/simplesamlphp-metadata-pdostoragehandler.txt @@ -15,18 +15,18 @@ Introduction If you want to run a clustered simpleSAMLphp IdP service and you would like to have centralized storage for metadata, you can use the PDO metadata storage handler. -The present document explains how to configure simpleSAMLphp and your database. +The present document explains how to configure SimpleSAMLphp and your database. Preparations ------------ -You will need to have the appropriate PDO drivers for your database. +You will need to have the appropriate PDO drivers for your database and you will have to configure the database secion within the config/config.php file. -Configuring the simpleSAMLphp +Configuring SimpleSAMLphp ----------------------------- You will first need to configure a PDO metadata source. @@ -37,12 +37,7 @@ Here is an example of flatfile plus PDO: 'metadata.sources' => array( array('type' => 'flatfile'), - array('type' => 'pdo', - 'dsn' => 'mysql:host=localhost;dbname=saml', - 'username' => 'simplesamlphp', - 'password' => 'SuperSecretPassword', - 'usePersistentConnection' => FALSE, - ), + array('type' => 'pdo'), ), @@ -81,4 +76,4 @@ To import all flatfile metadata files into the PDO database, run the following s [root@simplesamlphp simplesamlphp]# php bin/importPdoMetadata.php -In the event that you import a metadata for an entity id that already exists in the database, it will be overwritten. \ No newline at end of file +In the event that you import a metadata for an entity id that already exists in the database, it will be overwritten. diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php index 3a0030a69..e2ffbb909 100644 --- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php +++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerPdo.php @@ -10,6 +10,7 @@ * @author Tyler Antonio, University of Alberta <tantonio@ualberta.ca> * @package simpleSAMLphp */ + class SimpleSAML_Metadata_MetaDataStorageHandlerPdo extends SimpleSAML_Metadata_MetaDataStorageSource{ /** @@ -63,7 +64,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerPdo extends SimpleSAML_Metadata_ * * - 'password': Password for the database user. * - * @param $config An associtive array with the configuration for this handler. + * @param array $config An associtive array with the configuration for this handler. */ public function __construct($config) { assert('is_array($config)'); @@ -79,8 +80,8 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerPdo extends SimpleSAML_Metadata_ * This function loads the given set of metadata from a file our configured database. * This function returns NULL if it is unable to locate the given set in the metadata directory. * - * @param $set The set of metadata we are loading. - * @return Associative array with the metadata, or NULL if we are unable to load metadata from the given file. + * @param string $set The set of metadata we are loading. + * @return array $metadata Associative array with the metadata, or NULL if we are unable to load metadata from the given file. */ private function load($set) { assert('is_string($set)'); @@ -110,7 +111,7 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerPdo extends SimpleSAML_Metadata_ * Retrieve a list of all available metadata for a given set. * * @param string $set The set we are looking for metadata in. - * @return array An associative array with all the metadata for the given set. + * @return array $metadata An associative array with all the metadata for the given set. */ public function getMetadataSet($set) { assert('is_string($set)'); -- GitLab