-
Notifications
You must be signed in to change notification settings - Fork 69
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
sessions: addition of KVSession interface #292
base: master
Are you sure you want to change the base?
Conversation
89991aa
to
0bdc7e7
Compare
0bdc7e7
to
df00af1
Compare
@slint updated |
@@ -152,3 +154,14 @@ def default_session_store_factory(app): | |||
accounts_session_redis_url)) | |||
from simplekv.memory import DictStore | |||
return DictStore() | |||
|
|||
|
|||
class KVSessionInterfaceWithAnonymousSessions(KVSessionInterface): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small impact: IMO the name indicates that we store sessions for anonymous. I would suggest KVSessionInterfaceStoreAuthenticated
, also is it possible to test it?
Signed-off-by: Harris Tzovanakis <[email protected]>
df00af1
to
382f8b8
Compare
Working using latest ~/invenio-accounts $ git diff
diff --git a/setup.py b/setup.py
index 0eed598..81e41f9 100644
--- a/setup.py
+++ b/setup.py
@@ -75,7 +75,7 @@ install_requires = [
'email-validator>=1.0.5',
'future>=0.16.0',
'invenio-base>=1.2.2',
- 'invenio-i18n>=1.2.0',
+ 'invenio-i18n<1.2.0,>=1.1.1',
'invenio-celery>=1.1.2',
'invenio-rest>=1.1.3',
'maxminddb-geolite2>=2017.404',
~/invenio-accounts $ cd ../ && cookiecutter cookiecutter-invenio-instance
$ cd my-site
$ cat my_site/config.py
...
# Sessions
# ========
#: Whether the instance should use SameSite cookies to store client sessions.
SESSION_COOKIE_SAMESITE = 'Strict'
...
$ ./scripts/bootstrap
$ ./scripts/setup
$ pipenv install ../invenio-accounts # the dev version
$ pip env shell
$ pip uninstall flask-kvsession -y
$ pip show flask-kvsession-invenio
Name: Flask-KVSession-Invenio
Version: 0.6.3
...
$ ./scripts/server Note: Invenio-i18n version needs to be changed because Invenio 3.2.1 doesn't support it, but this doesn't change anything regarding Flask-KVSession integration We need to:
CC @ppanero. |
5d944cf
to
be9bd3d
Compare
Signed-off-by: Harris Tzovanakis [email protected]
Closes #289.