|
Lines 603-608
class SamlError(UMC_HTTPError):
Link Here
|
| 603 |
def multiple_identity_provider(self, idps, idp_query_param): |
603 |
def multiple_identity_provider(self, idps, idp_query_param): |
| 604 |
return self._('Could not pick an identity provider. You can specify one via the query string parameter %r from %r') % (idp_query_param, idps) |
604 |
return self._('Could not pick an identity provider. You can specify one via the query string parameter %r from %r') % (idp_query_param, idps) |
| 605 |
|
605 |
|
|
|
606 |
@error(status=500) |
| 607 |
def time_sync_error(self): |
| 608 |
return self._('The SAML message could not be verified. This is most likely a problem in the date settings of this server. Please inform an Administrator to resync the server clock.') |
| 609 |
|
| 606 |
|
610 |
|
| 607 |
class Ressource(object): |
611 |
class Ressource(object): |
| 608 |
|
612 |
|
|
Lines 1275-1280
class SAML(Ressource):
Link Here
|
| 1275 |
response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries) |
1279 |
response = self.sp.parse_authn_request_response(message, binding, self.outstanding_queries) |
| 1276 |
except (UnknownPrincipal, UnsupportedBinding, VerificationError, UnsolicitedResponse, StatusError, MissingKey, SignatureError): |
1280 |
except (UnknownPrincipal, UnsupportedBinding, VerificationError, UnsolicitedResponse, StatusError, MissingKey, SignatureError): |
| 1277 |
raise SamlError().from_exception(*sys.exc_info()) |
1281 |
raise SamlError().from_exception(*sys.exc_info()) |
|
|
1282 |
except AssertionError as exc: |
| 1283 |
tb = sys.exc_info()[2] |
| 1284 |
while tb.tb_next: |
| 1285 |
tb = tb.tb_next |
| 1286 |
if tb.tb_frame.f_code.co_name != '_verify': |
| 1287 |
raise |
| 1288 |
raise SamlError().time_sync_error() |
| 1278 |
if response is None: |
1289 |
if response is None: |
| 1279 |
raise SamlError().unparsed_saml_response() |
1290 |
raise SamlError().unparsed_saml_response() |
| 1280 |
return response |
1291 |
return response |