Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cookie lifetime configurable #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ Name|Required/Optional|Description
`SIMPLESAMLPHP_SP_SINGLE_LOGOUT_SERVICE`|Optional|The single logout url of your SP.
`SIMPLESAMLPHP_IDP_ADMIN_PASSWORD`|Optional|The password of admin of this IdP. Default is `secret`.
`SIMPLESAMLPHP_IDP_SECRET_SALT`|Optional|This is a secret salt used by this IdP when it needs to generate a secure hash of a value. Default is `defaultsecretsalt`.
`SIMPLESAMLPHP_IDP_SESSION_DURATION_SECONDS`|Optional|This value is the duration of the session of this IdP in seconds.
`SIMPLESAMLPHP_IDP_SESSION_DURATION_SECONDS`|Optional|This value is the duration of the session of this IdP in seconds. Defaults to 8 hours.
`SIMPLESAMLPHP_IDP_COOKIE_LIFETIME_SECONDS`|Optional|This value is the lifetime of the session cookie in seconds. Defaults to 0, meaning the cookie expires when the browser is closed.
`SIMPLESAMLPHP_IDP_BASE_URL`|Optional|This value allows you to override the base URL. Valuable for setting an `https://` base url behind a reverse proxy. **If you set this variable, please end it with a trailing `/`** example: `https://my.proxy.com/` Default is `` (empty string).

## Advanced Usage
Expand Down
2 changes: 1 addition & 1 deletion config/simplesamlphp/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
* Example:
* 'session.cookie.lifetime' => 30*60,
*/
'session.cookie.lifetime' => 0,
'session.cookie.lifetime' => intval(getenv('SIMPLESAMLPHP_IDP_COOKIE_LIFETIME_SECONDS')) > 0 ? intval(getenv('SIMPLESAMLPHP_IDP_COOKIE_LIFETIME_SECONDS')) : 0,

/*
* Limit the path of the cookies.
Expand Down