diff options
| author | Radomir Dopieralski <openstack@sheep.art.pl> | 2019-07-23 17:11:58 +0200 |
|---|---|---|
| committer | Radomir Dopieralski <openstack@sheep.art.pl> | 2019-09-16 12:45:23 +0200 |
| commit | 9d98a0c24d9a8c2541f820d24c0fc20fb7b4b3f5 (patch) | |
| tree | 7cf9a3b70487c98125a9fa9cc2dc9001a1d6a8af /openstack_auth/exceptions.py | |
| parent | 1208919617255eaf3adba1c14320ffc3e4d08d8b (diff) | |
| download | horizon-9d98a0c24d9a8c2541f820d24c0fc20fb7b4b3f5.tar.gz | |
Automatically redirect to the password change when it's expired
Unfortunately the only way we can know the user_id at this point is
by parsing the error message.
I also refactored the exceptions in openstack_auth to make them use
different classes (but one common superclass).
Partially implements blueprint: allow-users-change-expired-password
Change-Id: Ieceee09db21040b96577db19bd195dc3799e3892
Diffstat (limited to 'openstack_auth/exceptions.py')
| -rw-r--r-- | openstack_auth/exceptions.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/openstack_auth/exceptions.py b/openstack_auth/exceptions.py index cce0d6543..5925981c3 100644 --- a/openstack_auth/exceptions.py +++ b/openstack_auth/exceptions.py @@ -14,3 +14,35 @@ class KeystoneAuthException(Exception): """Generic error class to identify and catch our own errors.""" + + +class KeystoneTokenExpiredException(KeystoneAuthException): + """The authentication token issued by the Identity service has expired.""" + + +class KeystoneNoBackendException(KeystoneAuthException): + """No backend could be determined to handle the provided credentials.""" + + +class KeystoneNoProjectsException(KeystoneAuthException): + """You are not authorized for any projects or domains.""" + + +class KeystoneRetrieveProjectsException(KeystoneAuthException): + """Unable to retrieve authorized projects.""" + + +class KeystoneRetrieveDomainsException(KeystoneAuthException): + """Unable to retrieve authorized domains.""" + + +class KeystoneConnectionException(KeystoneAuthException): + """Unable to establish connection to keystone endpoint.""" + + +class KeystoneCredentialsException(KeystoneAuthException): + """Invalid credentials.""" + + +class KeystonePassExpiredException(KeystoneAuthException): + """The password is expired and needs to be changed.""" |
