401 among reasonable error codes.

This commit is contained in:
Roland Hedberg 2014-12-09 14:14:46 +01:00
parent ad5eb40dc6
commit 07f1fde2c2
3 changed files with 3 additions and 2 deletions

View File

@ -889,7 +889,7 @@ class Client(PBase):
elif reqresp.status_code == 500:
logger.error("(%d) %s" % (reqresp.status_code, reqresp.text))
raise Exception("ERROR: Something went wrong: %s" % reqresp.text)
elif reqresp.status_code == 400:
elif reqresp.status_code in [400, 401]:
#expecting an error response
if issubclass(response, ErrorResponse):
pass

View File

@ -601,7 +601,7 @@ class IdToken(OpenIDSchema):
raise NotForMe("", self)
if len(self["aud"]) > 1: # Then azr has to be present and be one of
# the values
# the aud ∫values
try:
assert "azr" in self
except AssertionError:

View File

@ -398,6 +398,7 @@ TYPE_METHOD = [(JWT_BEARER, JWSAuthnMethod)]
def verify_client(inst, areq, authn, type_method=TYPE_METHOD):
"""
Initiated Guessing !
:param areq: The request
:param authn: client authentication information