Commit Graph

6 Commits

Author SHA1 Message Date
Sean McGinnis 215217ea8b
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Idc319f3f8a3ddd57cba91e4cefc66dbb18d5cc22
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:53:42 -05:00
wangxiyuan 4fb7fef1ea No need to compare CONF content
When setup AuthProtocol class, if the CONF object contains
deprecated options, An Error "dictionary changed size during
iteration" will raise when comparing the CONF content.

Changing "!=" to "is not" here to avoid compare the CONF
content anymore.

Change-Id: I820aa244160db4f81149d2576386c86b46de0084
Closes-bug: #1789351
2018-09-07 10:38:14 +08:00
Colleen Murphy 409b482253 Rename auth_uri to www_authenticate_uri
The [keystone_authtoken]/auth_uri middleware parameter has been causing
extreme confusion amongst operators and developers ever since the
keystonemiddleware started accepting keystoneauth plugin parameters
including auth_url. The two parameters look identical and yet have
completely different meanings and are both required. This patch
deprecates auth_uri and renames it to www_authenticate_uri, which more
accurately describes the WWW-Authenticate header it is configuring and
is dissimilar to any other keystone_authtoken middleware parameter. This
also renames the internal variable names for consistency with the config
option.

Change-Id: I0cf11da3d395749df28077427689fdafc8a6b981
2017-10-11 14:00:49 +02:00
bhagyashris adb59a79e9 Fix typo 'olso' to 'oslo'
TrivialFix

Change-Id: I644bc36e3bf804c7546034ec8788671bd7cd01e6
2016-06-23 12:45:42 +05:30
Jamie Lennox 5cabfc1db0 Consolidate user agent calculation
Move all the auth_token middleware user_agent calculation into config
and only expose the user_agent property.

Change-Id: Ia6833845262c4de87ef95079de24d264e06f54fc
2016-06-10 18:22:44 +00:00
Jamie Lennox f8c150a9cc Create a Config object
The _conf_get ugliness in auth_token middleware has been around for a
long time now to handle the abstraction from different oslo.config
options and the paste overrides. This logic is now also being needed in
other middlewares. Extract this into a common config object that has a
better interface and is easier to work with.

Change-Id: I8b8a1427bc527e43bb1baec25a881d93df3f93cc
2016-06-10 18:21:56 +00:00