You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command will add `prolificinteractive/simplesamlphp-module-mongo` to your projects' composer.json file and install the module
29
+
into SSP's `modules` directory, which relative to your project's root directory is conventionally `vendor/simplesamlphp/simplesamlphp/modules`.
30
+
31
+
## Usage
32
+
33
+
Set the `store.type` option in your SSP config file to `mongo:Store`.
34
+
35
+
Provide your MongoDB connection information to the module by copying the file provided in the `config-templates` directory into SSP's config directory, and setting the following environment variables:
36
+
```
37
+
DB_MONGODB_HOST
38
+
DB_MONGODB_PORT
39
+
DB_MONGODB_USERNAME
40
+
DB_MONGODB_PASSWORD
41
+
DB_MONGODB_DATABASE
42
+
```
43
+
44
+
If your connecting to a replica set, you'll need to set the following environment variables below as well:
45
+
```
46
+
DB_DEFAULT_CONNECTION # Must contain the substring "_replica"
47
+
DB_MONGODB_REPLICASET
48
+
DB_MONGODB_READ_PREFERENCE
49
+
```
50
+
See the [Mongo extension PHP Manual](http://php.net/manual/en/mongo.manual.php) for more information about appropriate values for `DB_MONGODB_REPLICASET` and `DB_MONGODB_READ_PREFERENCE`.
51
+
52
+
Finally, you can enable the module by creating an empty file name `enable` in the `vendor/simplesamlphp/simplesamlphp/modules/mongo` directory.
53
+
54
+
**Note:** This module stores PHP session data in the `session` collection.
55
+
56
+
## Contributing to SimpleSAMLphp Mongo Module
57
+
58
+
To report a bug or enhancement request, feel free to file an issue under the respective heading.
59
+
60
+
If you wish to contribute to the project, fork this repo and submit a pull request.
SimpleSAMLphp Mongo Module is maintained and sponsored by Prolific Interactive. It may be redistributed under the terms specified in the [LICENSE] file.
0 commit comments