MobileBlur

Diff
Login

Diff

Differences From Artifact [d133c59928]:

To Artifact [e55e655978]:


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
        self.cas_check_url="%s/%s"%(self.urlbase,actions[1])
        self.cas_logout_url="%s/%s"%(self.urlbase,actions[2])
        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 ) 
    
    def login_url( self, next = "/" ):
        current.session.token=self._CAS_login()
        return next
    def logout_url( self, next = "/" ):
        current.session.token=None
        current.session.auth=None
        self._CAS_logout()







|
|
|
|
|
|







53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
        self.cas_check_url="%s/%s"%(self.urlbase,actions[1])
        self.cas_logout_url="%s/%s"%(self.urlbase,actions[2])
        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 )

    def login_url( self, next = "/" ):
        current.session.token=self._CAS_login()
        return next
    def logout_url( self, next = "/" ):
        current.session.token=None
        current.session.auth=None
        self._CAS_logout()
125
126
127
128
129
130
131

    def _CAS_logout( self ):
        """
        exposed CAS.logout()
        redirects to the CAS logout page
        """
        import urllib
        redirect("%s?service=%s" % (self.cas_logout_url,self.cas_my_url))








>
125
126
127
128
129
130
131
132
    def _CAS_logout( self ):
        """
        exposed CAS.logout()
        redirects to the CAS logout page
        """
        import urllib
        redirect("%s?service=%s" % (self.cas_logout_url,self.cas_my_url))