summaryrefslogtreecommitdiff
path: root/keystoneclient/v2_0/tokens.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove use of positional decoratorMorgan Fainberg2017-08-071-2/+0
| | | | | | | | | The positional decorator results in poorly maintainable code in a misguided effort to emulate python3's key-word-arg only notation and functionality. This patch removes keystoneclient's dependance on the positional decorator. Change-Id: I9e691cc8b0c04992f4a8dabd67e1b413d3220d23
* Use exceptions from KeystoneauthJamie Lennox2016-08-241-1/+1
| | | | | | | | | | | | | As keystoneclient and other services rely more on keystoneauth we should assume that keystoneauth is our base auth library, not keystoneclient and start to default to the objects provided from there. This will make it easier to remove these objects when the time comes. For the session independant parts of keystoneclient we should use the exception names as provided by keystoneauth instead of the aliases in keystoneclient. Change-Id: Ic513046f8398a76c244e145d6cc3117cdf6bb4cd
* Use AUTH_INTERFACE object from keystoneauthJamie Lennox2016-08-241-2/+2
| | | | | | | | | | | | | | As keystoneclient and other services rely more on keystoneauth we should assume that keystoneauth is our base auth library, not keystoneclient and start to default to the objects provided from there. This will make it easier to remove these objects when the time comes. Use the AUTH_INTERFACE special object from keystoneauth in most places. This uses it everywhere that is actually session independant. For example it is not changed within the keystoneclient auth plugins themselves as they are directly compatible with keystoneauth. Change-Id: Ibc1224fca98c852106feb78c624b0b2f22b3a19d
* Fixing D105 PEP257Navid Pustchi2016-05-041-0/+1
| | | | | | | | Currently tox ignores D105. D105: Missing docstring in magic method. This change removes it and make keystoneclient docstring compliant with it. Change-Id: I34dfc164891880425f542f8f8aa3426ec8640c96
* Fixing D202 and D203 PEP257 violation.Navid Pustchi2016-05-041-1/+0
| | | | | | | | | Currently tox ignores D202 and D203. D202: No blank lines allowed after function docstring. D203: 1 blank required before class docstring. This change removes D202 and D203 ignores in tox and fix violations. Change-Id: I97ef88c9cfd56774e47f789cbbcf8ccfe85d7737
* Fix D401 PEP257 violation.Navid Pustchi2016-04-231-1/+1
| | | | | | | | Currently tox ignores D401. 401: First line should be in imperative mood. This change removes it and make keystoneclient docstrings compliant with it. Change-Id: If34ff12d18390b357342cf29f2d116dd3c86a44d
* use positional library instead of utilsSteve Martinelli2016-01-251-2/+3
| | | | | | swap instances of utils.positional with the positional library. Change-Id: Id8a9961e68d287a802f25512fc970829e9feb5c2
* Remove "deprecated" internal methodBrant Knudson2015-12-291-2/+2
| | | | | | | This method says it's deprecated but it's an internal method, so there's no need to deprecate it, just remove it. Change-Id: I916b4a5c9dc2320a4bff7f966fd0c7d5a4957ff9
* Add get_token_data to token CRUDJamie Lennox2015-07-151-4/+14
| | | | | | | | | | | | | We already have the validate method that returns an AccessInfo object. For auth_token middleware it would be simpler if the client returned simply the token data so it presented the same way as other sources of token data. It would also help with the keystoneauth transition in auth_token as we could bypass the keystoneclient.AccessInfo objects. Closes-Bug: #1475041 Change-Id: Ifbe7a7004937d910739c325cc04ae7264a4498e0
* Add validate token for v2.0Brant Knudson2015-01-281-0/+32
| | | | | | | | There was no API to validate a token using v2.0. bp auth-token-use-client Change-Id: I22223f546e750457a0c9d851ef389f7983e5c205
* Add fetch revocations for v2.0Brant Knudson2014-12-161-0/+10
| | | | | | | | There was no API to fetch revocations using v2.0. bp auth-token-use-client Change-Id: Ica5aae5b9075180223268fb6b2ef11e00dfd057f
* I18nBrant Knudson2014-10-281-1/+3
| | | | | | | | | | | Keystoneclient didn't provide translated messages. With this change, the messages are marked for translation. DocImpact Implements: blueprint keystoneclient-i18n Change-Id: I85263a71671a1dffed524185266e6bb7ae559630
* Change unscoped token fallback to be session awareJamie Lennox2014-08-121-8/+15
| | | | | | | | | | | | The existing way of sending requests to the auth_url was to override the management_url for the duration of a single call. Aside from being ugly, this won't work with session objects where the management_url is ignored. The tests for this behaviour have been previously merged to ensure that the before and after behaviour remains unchanged. Change-Id: I879adcb25dd373ab4a7b77b6539974e22220aad4
* Don't log sensitive auth dataJamie Lennox2014-07-241-1/+1
| | | | | | | | | | | | | | | | Add the ability to turn off logging from the session object and then handle logging of auth requests within their own sections. This is a very simplistic ability to completely disable logging. Logging more filtered debugging can be added later. This new ability is utilized in this patch to prevent logging of requests that include passwords. This covers authenticate, password change, and user update requests that include passwords. SecurityImpact Change-Id: I3dabb94ab047e86b8730e73416c1a1c333688489 Closes-Bug: #1004114 Closes-Bug: #1327019
* Start using positional decoratorJamie Lennox2014-03-251-0/+2
| | | | | | | | | Apply the positional decorator to functions. It has been added as I think best practice would dictate, though in some places it has been added in a way that doesn't break existing tests. Closes-Bug: #1295881 Change-Id: I4f7ddbede4cba4ab79d144ad1f9dc83ea76f204a
* Remove redundant default value None for dict.getZhiQiang Fan2014-02-221-1/+1
| | | | | | The default value for dict.get is None, no need to specify again. Change-Id: I9f0204e59bd4c1642586bddfef0c75e0a7730925
* Remove vim headerEric Guo2014-02-081-2/+0
| | | | | | | | We don't need vim modelines in each source file, it can be set in user's vimrc. Change-Id: Ic7a61430a0a320ce6b0c4518d9f5d988e35f8aae Closes-Bug: #1229324
* Fix License Headers and Enable Gating on H102Morgan Fainberg2013-08-271-0/+14
| | | | | | | | Add ASLv2 headers to files that were missing it. fixes bug #1211587 Change-Id: Iede918e1ce84993cee4ecbb2d9c2606627fa412e
* Make ManagerWithFind abstract and fix TokenManagerAlessio Ababilov2013-05-191-1/+1
| | | | | | | | | ManagerWithFind requires list() method in its descendants. Make it abstract and fix its improper descendant TokenManager that do not implement list(). Change-Id: I83ae47d894c02d5cd1eb0da437dd05796d0b0160 Fixes: bug #1180393
* Revert "Use TokenManager to get token"Dolph Mathews2013-04-301-2/+9
| | | This reverts commit 22228f526d6ea08b7006be1287afe959b93c23db which appears to be breaking the keystone gating
* Use TokenManager to get tokenJulien Danjou2013-04-191-9/+2
| | | | | | | | Instead of implementing token retrieval twice, let's use the code provided by the TokenManger to get a token in raw format from Keystone. Change-Id: I769be118ee137580cabd5cabcf7843e7afe1e456 Signed-off-by: Julien Danjou <julien@danjou.info>
* removing repeat attempt at authorization in clientJoe Heck2012-11-091-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | blueprint solidify-python-api * extended and updated documentation strings * updated README.rst with latest options * made debug a pass-through value, optionally set on client (instead of just being pulled from environment variable) * adding AccessInfo object and associated tests (access.AccessInfo meant to be a cacheable object external to client and ultimately to replace service_catalog and it's existing functionality) * extending authtoken to support lists of endpoints * maintaining a single entity for client.management_url with first from list of possible endpoints * create project_name and project_id synonyms to match tenant_name and tenant_id * replacing authenticate call to a pure method, not overloading the resource/manager path that confuses base URL concepts. * throw AuthorizationFailure if client attempts to access keystone resources before it has a management url * special case listing tenant using auth_url for unscoped tokens authorized through client * special case listing tokens.authenticate for Dashboard to allow unscoped tokens to hand back parity information to dashboard Change-Id: I4bb3a1b6a5ce2c4b3fbcebeb59116286cac8b2e3
* Allow --token and --endpoint to bypass catalogVishvananda Ishaya2012-02-081-1/+1
| | | | | | | | * allows skipping of service catalog * removes odd logic about password equivalence * also removes extra call to authenticate Change-Id: I5c0979107da99593b4ce8eb16c9695ba530da095
* Added delete tokenDolph Mathews2012-01-301-0/+3
| | | | Change-Id: I202f89f74702df6b775d4fa3ca3fca2111709949
* more work on standardization of cliauthJesse Andrews2011-12-171-3/+3
|
* remove user_id as you shouldn't auth using itJesse Andrews2011-12-171-5/+2
|
* initial pass to cliauth blueprintJesse Andrews2011-12-171-6/+11
|
* more pep8 cleanupJoe Heck2011-11-101-0/+2
|
* Cleans up the data returned for a token a little.Gabriel Hurley2011-10-271-5/+4
|
* Initial commit.Gabriel Hurley2011-10-251-0/+37