Move DisableModuleFixture to utils

Move DisableModuleFixture to test utilities instead of auth token
middleware tests, so it can be reused for the oauthlib tests.

implements: bp add-oauth-support
Change-Id: I09723a9f0e28e73e1aa31072e514f5fae2173100
Updated from global requirements

Change-Id: I96f8f84be09b2e68e12d6c6b37079f83610c29a3
Auth Plugin invalidation

To allow session to re-fetch a token on an Unauthorized call we add an
invalidate method to auth plugins that is expected to flush all the
current authentication data from the plugin such that it will be
refreshed on next request.

This is then used to reissue requests from session when an Unauthorized
is called.

Change-Id: I98fa76fd67e97dc0a8c1ec0bf734792c337b5177
blueprint: keystoneclient-auth-token
Fixed an aparent typo in the code

Change-Id: I62f8cc1581379869148b3a293b74c29057101a94
Merge "Auth Plugin invalidation"
Session loading from conf and CLI

Allow loading session objects from CLI and oslo.config. We will want CLI
for shell and conf for auth_token.

Change-Id: I1e83280b2f76f16041ed8d5ed598db70210112bd
Plugin loading from config objects

Provide a pattern for auth plugins to load themselves from a config
object. The first user of this will be auth_token middleware however it
is not likely to be the only user.

By doing this in an exportable way we are defining a single config file
format for specifying how to load a plugin for all services.

Loading from CONF is just one of the ways plugins might be loaded.
The decision not to expose params as oslo.config options is on
purpose as there is cliff and other loading mechanisms besides
oslo.config we need to support.

Blueprint: plugin-params
Change-Id: I353b26a1ffc04a20666e76f5bd2f1e6d7c19a22d
Set paste options in middleware as CONF overrides

Currently we use _conf_get when checking options to make sure we check
options passed from the paste config before checking those in oslo CONF.
With the introduction of loading session and authentication options from
the CONF file these really need to be all set on the CONF object so use
the overrides mechanism to make paste options take priority.

Change-Id: Ib575f6e22d6b17505126ce992aabd70b75157c95
Convert auth_token to use session

This patch should emulate the same behaviour of the existing auth token
middleware but using the new session object for requests and token
management.

There is one test removed in this patch which was to do with having the
auth token refreshed if it was stale. This is no longer handled by the
middleware but expected to be managed by the auth plugin.

This fixes the existing behaviour that if an admin_token was given and
was marked invalid then the middleware would fallback to using the
username and password provided. If an authentication method fails then
this is something that should be addressed not compensated for.

Blueprint: keystoneclient-auth-token
Change-Id: I1e7a4a63fd52ace92a1000d3f9330961c42e411f
Closes-Bug: #1307252