@@ -44,7 +44,7 @@ def prepare_bottle_request(req):
4444
4545@app .route ('/acs/' , method = 'POST' )
4646@jinja2_view ('index.html' , template_lookup = ['templates' ])
47- def index ():
47+ def acs ():
4848 req = prepare_bottle_request (request )
4949 auth = init_saml_auth (req )
5050 paint_logout = False
@@ -62,7 +62,7 @@ def index():
6262 self_url = OneLogin_Saml2_Utils .get_self_url (req )
6363 if 'RelayState' in request .forms and self_url != request .forms ['RelayState' ]:
6464 # To avoid 'Open Redirect' attacks, before execute the redirection confirm
65- # the value of the request.forms['RelayState'] is a trusted URL.
65+ # the value of the request.forms['RelayState'] is a trusted URL.
6666 return redirect (request .forms ['RelayState' ])
6767
6868 if 'samlUserdata' in session :
@@ -71,10 +71,10 @@ def index():
7171 attributes = session ['samlUserdata' ].items ()
7272
7373 return {
74- 'errors' :errors ,
75- 'not_auth_warn' :not_auth_warn ,
76- 'attributes' :attributes ,
77- 'paint_logout' :paint_logout
74+ 'errors' : errors ,
75+ 'not_auth_warn' : not_auth_warn ,
76+ 'attributes' : attributes ,
77+ 'paint_logout' : paint_logout
7878 }
7979
8080
@@ -124,11 +124,11 @@ def index():
124124 attributes = session ['samlUserdata' ].items ()
125125
126126 return {
127- 'errors' :errors ,
128- 'not_auth_warn' :not_auth_warn ,
129- 'success_slo' :success_slo ,
130- 'attributes' :attributes ,
131- 'paint_logout' :paint_logout
127+ 'errors' : errors ,
128+ 'not_auth_warn' : not_auth_warn ,
129+ 'success_slo' : success_slo ,
130+ 'attributes' : attributes ,
131+ 'paint_logout' : paint_logout
132132 }
133133
134134
@@ -144,8 +144,8 @@ def attrs():
144144 if len (session ['samlUserdata' ]) > 0 :
145145 attributes = session ['samlUserdata' ].items ()
146146
147- return {'paint_logout' :paint_logout ,
148- 'attributes' :attributes }
147+ return {'paint_logout' : paint_logout ,
148+ 'attributes' : attributes }
149149
150150
151151@app .route ('/metadata/' )
@@ -178,7 +178,7 @@ def run(self, handler):
178178
179179if __name__ == "__main__" :
180180 # To run HTTPS
181- #run(SessionMiddleware(app, config=session_opts), host='0.0.0.0', port=8000, debug=True, reloader=True, server=SSLPasteServer)
181+ # run(SessionMiddleware(app, config=session_opts), host='0.0.0.0', port=8000, debug=True, reloader=True, server=SSLPasteServer)
182182
183183 # To run HTTP
184184 run (SessionMiddleware (app , config = session_opts ), host = '0.0.0.0' , port = 8000 , debug = True , reloader = True , server = 'paste' )
0 commit comments