AuthorizationFailure: Authorization failed: Cannot authenticate without an auth_url
Bug #1547331 reported by
Julian Edwards
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-keystoneclient |
Expired
|
Undecided
|
Unassigned |
Bug Description
If you create a client using a session and an endpoint override, if you then call authenticate() on the client it blows up with the error
AuthorizationFa
There is a comment in the code that the newer behaviour with sessions is to now authenticate with the server on the first call, but:
- is authenticate() still supposed to work?
- if not, how can you pre-auth before any work is done to validate user-supplied credentials?
affects: | keystone → python-keystoneclient |
To post a comment you must log in.
No - authenticated() is not supposed to work because the job of authenticating has been removed from the client object.
The idea was to not pre-auth, just do what you want to do and catch an AuthorizationFa ilure if something goes wrong when auth does happen. If you really need to prompt an auth you can do like session.get_token() which will return you an active token which will prompt auth if there hasn't been one or return you a still valid token if there has.
Is there any reason you must pre-auth? the error for an auth failure is fairly distinctive from others.