fixed 1774:CAS client broken when using routes.py, thanks remco.boerma

This commit is contained in:
mdipierro
2013-11-16 03:23:03 -06:00
parent ff7ef47cc7
commit f53da87f6f
2 changed files with 5 additions and 11 deletions

View File

@@ -1 +1 @@
Version 2.7.4-stable+timestamp.2013.11.16.03.15.58
Version 2.7.4-stable+timestamp.2013.11.16.03.22.18

View File

@@ -9,7 +9,7 @@ License: GPL v2
Tinkered by Szabolcs Gyuris < szimszo n @ o regpreshaz dot eu>
"""
from gluon import current, redirect
from gluon import current, redirect, URL
class CasAuth(object):
@@ -56,15 +56,9 @@ class CasAuth(object):
self.maps = maps
self.casversion = casversion
self.casusername = casusername
http_host = current.request.env.http_x_forwarded_host
if not http_host:
http_host = current.request.env.http_host
if current.request.env.wsgi_url_scheme in ['https', 'HTTPS']:
scheme = 'https'
else:
scheme = 'http'
self.cas_my_url = '%s://%s%s' % (
scheme, http_host, current.request.env.path_info)
self.cas_my_url = URL(args=current.request.args,
vars=current.request.vars,
scheme=True)
def login_url(self, next="/"):
current.session.token = self._CAS_login()