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

Ckan logout #110

Open
wants to merge 4 commits into
base: main
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: 3 additions & 0 deletions ckanext/saml2auth/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def logout(self):
else:
log.info(u'No user was logged in!')

if toolkit.check_ckan_version(min_version="2.10"):
session.clear()

return response


Expand Down
2 changes: 1 addition & 1 deletion ckanext/saml2auth/tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
def test_generate_password():
password = h.generate_password()
assert len(password) == 8
assert type(password) == str
assert type(password) is str


def test_default_login_disabled_by_default():
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
long_description_content_type='text/markdown',

# The project's main homepage.
url='https://github.com/keitaroinc/'\
'ckanext-saml2auth',
url='https://github.com/keitaroinc/ckanext-saml2auth',

# Author details
author='''Keitaro Inc''',
Expand Down
Loading