fixed 1774:CAS client broken when using routes.py, thanks remco.boerma
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ License: GPL v2
|
|||||||
Tinkered by Szabolcs Gyuris < szimszo n @ o regpreshaz dot eu>
|
Tinkered by Szabolcs Gyuris < szimszo n @ o regpreshaz dot eu>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from gluon import current, redirect
|
from gluon import current, redirect, URL
|
||||||
|
|
||||||
|
|
||||||
class CasAuth(object):
|
class CasAuth(object):
|
||||||
@@ -56,15 +56,9 @@ class CasAuth(object):
|
|||||||
self.maps = maps
|
self.maps = maps
|
||||||
self.casversion = casversion
|
self.casversion = casversion
|
||||||
self.casusername = casusername
|
self.casusername = casusername
|
||||||
http_host = current.request.env.http_x_forwarded_host
|
self.cas_my_url = URL(args=current.request.args,
|
||||||
if not http_host:
|
vars=current.request.vars,
|
||||||
http_host = current.request.env.http_host
|
scheme=True)
|
||||||
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)
|
|
||||||
|
|
||||||
def login_url(self, next="/"):
|
def login_url(self, next="/"):
|
||||||
current.session.token = self._CAS_login()
|
current.session.token = self._CAS_login()
|
||||||
|
|||||||
Reference in New Issue
Block a user