From 838dc9f3da30bbf3a541a60950b226bf758c2076 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Thu, 26 Feb 2015 15:43:07 +0100 Subject: [PATCH] if no access_token for current client, redo sso --- ckanext/ozwillo_pyoidc/plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ckanext/ozwillo_pyoidc/plugin.py b/ckanext/ozwillo_pyoidc/plugin.py index fec4d9f..d479a9f 100755 --- a/ckanext/ozwillo_pyoidc/plugin.py +++ b/ckanext/ozwillo_pyoidc/plugin.py @@ -173,6 +173,9 @@ class OpenidController(base.BaseController): redirect_uri = org_url + '/logout' + if not hasattr(client, 'access_token'): + self.sso(g.name) + # revoke the access token headers = {'Content-Type': 'application/x-www-form-urlencoded'} data = 'token=' + client.access_token