This commit is contained in:
Milos Stojanovic
2019-06-18 14:27:31 +02:00
parent 7f3e111d49
commit f8940c8713
9 changed files with 179 additions and 234 deletions

View File

@@ -1,5 +1,5 @@
### Configuring Session service to use database
## Configuring Session service to use database
First, create a table ```sessions``` with this sql:
```
@@ -35,9 +35,9 @@ Then, open ```configuration.php``` and update Auth handler under section ```serv
Don't forget to enter correct mysql username, password, and database.
### Tweaking session options
## Tweaking session options
The Underying Symfony session [component](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php) constructor accepts an array options.
The Underying Symfony session [component](https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php) constructor accepts an array of options.
For example you can pass ```cookie_lifetime``` parameter and extend session lifetime like this:
```
'Filegator\Services\Session\SessionStorageInterface' => [