diff options
-rw-r--r-- | quoins/openid_controllers.py | 11 | ||||
-rw-r--r-- | quoins/templates/oid_confirm.html | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/quoins/openid_controllers.py b/quoins/openid_controllers.py index 2d15c7e..8b1619f 100644 --- a/quoins/openid_controllers.py +++ b/quoins/openid_controllers.py | |||
@@ -51,6 +51,7 @@ class DecideController(object): | |||
51 | session.save() | 51 | session.save() |
52 | 52 | ||
53 | d = dict(openid = self.oid_controller, | 53 | d = dict(openid = self.oid_controller, |
54 | oid_return_verified = request.environ['oid_return_verified'], | ||
54 | oid_request = oid_request, | 55 | oid_request = oid_request, |
55 | required = sr_required, | 56 | required = sr_required, |
56 | optional = sr_optional, | 57 | optional = sr_optional, |
@@ -174,11 +175,17 @@ class OpenIDController(TGController): | |||
174 | oid_request = oserver.decodeRequest(request.params) | 175 | oid_request = oserver.decodeRequest(request.params) |
175 | request.environ['oid_request']=oid_request | 176 | request.environ['oid_request']=oid_request |
176 | 177 | ||
178 | request.environ['oid_return_verified']='not verified' | ||
177 | if oid_request.mode in ['checkid_immediate', 'checkid_setup']: | 179 | if oid_request.mode in ['checkid_immediate', 'checkid_setup']: |
178 | if hasattr(oid_request, 'returnToVerified'): | 180 | if hasattr(oid_request, 'returnToVerified'): |
179 | if not (oid_request.trustRootValid() | 181 | if not oid_request.trustRootValid(): |
180 | and oid_request.returnToVerified()): | ||
181 | raise Exception("Not trusted") | 182 | raise Exception("Not trusted") |
183 | try: | ||
184 | if not oid_request.returnToVerified(): | ||
185 | raise Exception("Not trusted") | ||
186 | request.environ['oid_return_verified']='verified' | ||
187 | except: | ||
188 | pass | ||
182 | else: | 189 | else: |
183 | if not (oid_request.trustRootValid()): | 190 | if not (oid_request.trustRootValid()): |
184 | raise Exception("Not trusted") | 191 | raise Exception("Not trusted") |
diff --git a/quoins/templates/oid_confirm.html b/quoins/templates/oid_confirm.html index 4fcf1de..c5d4f88 100644 --- a/quoins/templates/oid_confirm.html +++ b/quoins/templates/oid_confirm.html | |||
@@ -19,12 +19,11 @@ | |||
19 | <form action="${openid.url('/finish')}" method="post"> | 19 | <form action="${openid.url('/finish')}" method="post"> |
20 | 20 | ||
21 | <p> | 21 | <p> |
22 | The site <b>${oid_request.trust_root}</b> | 22 | The site <b>${oid_request.trust_root}</b> (URL <b>${oid_return_verified}</b>) |
23 | wants to verify that you are identified by <b>${request.identity['user']}</b> | 23 | wants to verify that you are identified by <b>${request.identity['user']}</b> |
24 | and has requested the following information: | 24 | and has requested the following information: |
25 | </p> | 25 | </p> |
26 | 26 | ||
27 | |||
28 | <div py:if="required"> | 27 | <div py:if="required"> |
29 | <h3> Required information </h3> | 28 | <h3> Required information </h3> |
30 | <ul> | 29 | <ul> |