diff options
author | Guang Yee <guang.yee@hp.com> | 2013-01-08 08:46:20 -0800 |
---|---|---|
committer | Guang Yee <guang.yee@hp.com> | 2013-02-20 13:18:38 -0800 |
commit | 9f812939d4b05384b0a7d48e6b916baeca0477dc (patch) | |
tree | dda2e10abea730ab99955b3d595e60735b273a1f /keystone/exception.py | |
parent | d036db145d51f8b134ffa36165065a8986e4f8a1 (diff) | |
download | keystone-9f812939d4b05384b0a7d48e6b916baeca0477dc.tar.gz keystone-9f812939d4b05384b0a7d48e6b916baeca0477dc.tar.xz keystone-9f812939d4b05384b0a7d48e6b916baeca0477dc.zip |
v3 token API
Also implemented the following:
blueprint pluggable-identity-authentication-handlers
blueprint stop-ids-in-uris
blueprint multi-factor-authn (just the plumbing)
What's missing?
* domain scoping (will be implemented by Henry?)
Change-Id: I191c0b2cb3367b2a5f8a2dc674c284bb13ea97e3
Diffstat (limited to 'keystone/exception.py')
-rw-r--r-- | keystone/exception.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/keystone/exception.py b/keystone/exception.py index 5060dbfd..017db27f 100644 --- a/keystone/exception.py +++ b/keystone/exception.py @@ -114,6 +114,24 @@ class Unauthorized(SecurityError): title = 'Not Authorized' +class AuthPluginException(Unauthorized): + """ Authentication plugin error. """ + authentication = {} + + +class AuthMethodNotSupported(AuthPluginException): + """ Attempted to authenticate with an unsupported method. """ + authentication = {'methods': CONF.auth.methods} + + +class AdditionalAuthRequired(AuthPluginException): + """ Additional authentications steps required. """ + + def __init__(self, auth_response=None, **kwargs): + super(AdditionalAuthRequired, self).__init__(message=None, **kwargs) + self.authentication = auth_response + + class Forbidden(SecurityError): """You are not authorized to perform the requested action.""" code = 403 |