Support explicit authorization
Bug #1513200 reported by
Brian Curtin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
Fix Committed
|
High
|
Unassigned |
Bug Description
We currently take credentials in the Connection but don't do anything with them until you try to do anything. We should probably support something like an `authorize` method on Connection that either succeeds or fails there, instead of applications breaking down at potentially odd spots for somewhat unrelated reasons (think of a create_container failing just for bad credentials, the failure isn't *really* tied to create_container)
This wouldn't be required -- we'd still go grab a token on the first request if you're not already authorized -- but it can be nice to know even earlier than your first call whether or not the app is going to work.
tags: | added: auth session |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/242681 /git.openstack. org/cgit/ openstack/ python- openstacksdk/ commit/ ?id=0ed87c2cc17 d24e123864a58ba e2841ca49ce155
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0ed87c2cc17d24e 123864a58bae284 1ca49ce155
Author: Brian Curtin <email address hidden>
Date: Fri Nov 6 16:49:43 2015 -0600
Add authorize method to Connection
The ability to know your application is going to fail due to a authorize,
credential issue *before* getting into the application and attempting to
make some API call can be useful. This change adds Connection.
which just does the same thing we do implicitly. It's entirely optional
and is documented as such.
Co-Authored-By: Qiming Teng (<email address hidden>) ff31f37294a000c 6972c947182
Closes-Bug: #1513200
Change-Id: If86f308da909c4