diff --git a/lib/SimpleSAML/Configuration.php b/lib/SimpleSAML/Configuration.php
index 7d1a00c320b0602c4b5db129dce1d89865cb3d8e..b1745344423e21aa720c3bcf48ab536e35173396 100644
--- a/lib/SimpleSAML/Configuration.php
+++ b/lib/SimpleSAML/Configuration.php
@@ -723,6 +723,17 @@ class SimpleSAML_Configuration {
 		return array_keys($this->configuration);
 	}
 
+
+	/**
+	 * Convert this configuration object back to an array.
+	 *
+	 * @return array  An associative array with all configuration options and values.
+	 */
+	public function toArray() {
+
+		return $this->configuration;
+	}
+
 }
 
 ?>
\ No newline at end of file