aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2020-04-08 09:18:17 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2020-04-08 09:18:17 +0200
commitd20a8c5fb487fbdd0723bfbd09087513062c0b3f (patch)
tree4313efbc3102fb5c931f5c01c9debfa5a15e2f32
parent023c8117ec6e8284ee288d5775fc9ab09eab1a2e (diff)
downloadwallabag-d20a8c5fb487fbdd0723bfbd09087513062c0b3f.tar.gz
wallabag-d20a8c5fb487fbdd0723bfbd09087513062c0b3f.tar.zst
wallabag-d20a8c5fb487fbdd0723bfbd09087513062c0b3f.zip
Add ability to define lifetime token for the API
It'll allow admin of a wallabag instance to define its own lifetime for the refresh token and the access token. The default value are the recommended one from the wallabag team.
-rw-r--r--app/config/config.yml3
-rw-r--r--app/config/parameters.yml.dist5
2 files changed, 7 insertions, 1 deletions
diff --git a/app/config/config.yml b/app/config/config.yml
index 0b325afe..4eea0531 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -195,7 +195,8 @@ fos_oauth_server:
195 service: 195 service:
196 user_provider: fos_user.user_provider.username_email 196 user_provider: fos_user.user_provider.username_email
197 options: 197 options:
198 refresh_token_lifetime: 1209600 198 refresh_token_lifetime: "%fos_oauth_server_refresh_token_lifetime%"
199 access_token_lifetime: "%fos_oauth_server_access_token_lifetime%"
199 200
200scheb_two_factor: 201scheb_two_factor:
201 trusted_device: 202 trusted_device:
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 9948fa46..92047121 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -46,6 +46,11 @@ parameters:
46 fosuser_registration: true 46 fosuser_registration: true
47 fosuser_confirmation: true 47 fosuser_confirmation: true
48 48
49 # how long the access token should live in seconds for the API
50 fos_oauth_server_access_token_lifetime: 3600
51 # how long the refresh token should life in seconds for the API
52 fos_oauth_server_refresh_token_lifetime: 1209600
53
49 from_email: no-reply@wallabag.org 54 from_email: no-reply@wallabag.org
50 55
51 rss_limit: 50 56 rss_limit: 50