diff options
author | Roland Hedberg <roland.hedberg@adm.umu.se> | 2013-02-08 20:13:51 +0100 |
---|---|---|
committer | Roland Hedberg <roland.hedberg@adm.umu.se> | 2013-02-08 20:13:51 +0100 |
commit | 1f2d6db5618150517c53c2b85f3d99669408c25d (patch) | |
tree | fc2b9528b8dda0fe2aa978efafb14cc13d5f27db /src/saml2/s_utils.py | |
parent | 41a3a88a6ae59ec277db14997471428ea529c266 (diff) | |
download | pysaml2-1f2d6db5618150517c53c2b85f3d99669408c25d.tar.gz |
Couple of new Exceptions
Diffstat (limited to 'src/saml2/s_utils.py')
-rw-r--r-- | src/saml2/s_utils.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/saml2/s_utils.py b/src/saml2/s_utils.py index 38c9aeb3..cb5e1d5f 100644 --- a/src/saml2/s_utils.py +++ b/src/saml2/s_utils.py @@ -27,16 +27,25 @@ import zlib logger = logging.getLogger(__name__) -class VersionMismatch(Exception): +class SamlException(Exception): pass -class Unknown(Exception): +class RequestVersionTooLow(SamlException): pass -class UnknownPrincipal(Unknown): +class RequestVersionTooHigh(SamlException): pass - -class UnsupportedBinding(Exception): + +class UnknownPrincipal(SamlException): + pass + +class UnsupportedBinding(SamlException): + pass + +class VersionMismatch(Exception): + pass + +class Unknown(Exception): pass class OtherError(Exception): @@ -56,6 +65,8 @@ EXCEPTION2STATUS = { VersionMismatch: samlp.STATUS_VERSION_MISMATCH, UnknownPrincipal: samlp.STATUS_UNKNOWN_PRINCIPAL, UnsupportedBinding: samlp.STATUS_UNSUPPORTED_BINDING, + RequestVersionTooLow: samlp.STATUS_REQUEST_VERSION_TOO_LOW, + RequestVersionTooHigh: samlp.STATUS_REQUEST_VERSION_TOO_HIGH, OtherError: samlp.STATUS_UNKNOWN_PRINCIPAL, MissingValue: samlp.STATUS_REQUEST_UNSUPPORTED, # Undefined |