summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/auth/handlers.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-05-18 20:06:26 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-05-18 20:06:26 +0800
commitc6bda58ba44dddb9151862d75a53224e7ad03227 (patch)
tree1d8e74ee8eeb3d7b69dd350396fb009a5d3e8a0c /testapi/opnfv_testapi/ui/auth/handlers.py
parentd57892f46ca4864f2188d0e4fccb97d3987c10d1 (diff)
support showing user's specified contents after signin
Change-Id: Ia8897860757a2395873ff6972a508c38d7139854 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/opnfv_testapi/ui/auth/handlers.py')
-rw-r--r--testapi/opnfv_testapi/ui/auth/handlers.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/testapi/opnfv_testapi/ui/auth/handlers.py b/testapi/opnfv_testapi/ui/auth/handlers.py
deleted file mode 100644
index 511952d..0000000
--- a/testapi/opnfv_testapi/ui/auth/handlers.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from six.moves.urllib import parse
-
-from opnfv_testapi.common import config
-from opnfv_testapi.resources import handlers
-from opnfv_testapi.ui.auth import constants as const
-from opnfv_testapi.ui.auth import utils
-
-
-CONF = config.Config()
-
-
-class SigninHandler(handlers.GenericApiHandler):
- def get(self):
- csrf_token = utils.get_token()
- return_endpoint = parse.urljoin(CONF.api_url,
- CONF.osid_openid_return_to)
- return_to = utils.set_query_params(return_endpoint,
- {const.CSRF_TOKEN: csrf_token})
-
- params = {
- const.OPENID_MODE: CONF.osid_openid_mode,
- const.OPENID_NS: CONF.osid_openid_ns,
- const.OPENID_RETURN_TO: return_to,
- const.OPENID_CLAIMED_ID: CONF.osid_openid_claimed_id,
- const.OPENID_IDENTITY: CONF.osid_openid_identity,
- const.OPENID_REALM: CONF.api_url,
- const.OPENID_NS_SREG: CONF.osid_openid_ns_sreg,
- const.OPENID_NS_SREG_REQUIRED: CONF.osid_openid_sreg_required,
- }
- url = CONF.osid_openstack_openid_endpoint
- url = utils.set_query_params(url, params)
- self.redirect(url=url, permanent=False)
-
-
-class SigninReturnHandler(handlers.GenericApiHandler):
- def get(self):
- self.redirect(url=CONF.ui_url)