Updated from global requirements

Change-Id: I4b2838822df8e6141abd7ef0f79774c6fb911e3a
Add user_domain_name in the user object

user_domain_name is exposed by keystoneclient, adding
this information for horizon as well.

Change-Id: Ic09b892bcb7669ed19a353e535d1aea43bbe92b7
Closes-Bug: #1360521
Configurable token hashing algorithm

The user's authentication token was hashed using the MD5 algorithm.
The MD5 algorithm shouldn't be used because of the potential for
hash collisions. Some security standards mandate a SHA2 algorithm
or better must be used.

With this change the algorithm to use for hashing tokens can be
configured by setting the OPENSTACK_TOKEN_HASH_ALGORITHM
configuration option to a hash algorithm supported by Python's
hashlib library[1]. For example, a deployer could set the option to
'sha256' to meet a SHA2 security standard.

The algorithm chosen must match the hash algorithm that the
identity server is configured to use (Keystone and the auth_token
middleware can be configured to use any hash algorithm supported by
hashlib).

This is for security hardening.

[1] https://docs.python.org/2/library/hashlib.html

DocImpact
SecurityImpact

Change-Id: I9e3eba7e0a12ae40a08d0ed851ea916ec6591bcc
Closes-Bug: #1174499
Added url_path_replace and has_in_url_path methods

utils.py, views.py and backend.py were using .replace('v3', 'v2.0') and
.replace('v2.0', 'v3') methods on url strings.
This is BAD because if you have v3 in your url's domain it brakes it.

A new url_path_replace method now only performs the replaces in the url path
and leaves the domain unchanged.

Some checks where performed to test if a substring was in the url path but the
tests where performed on the whole url and could return a false positive if the
substring exists in the domain name or in the query string.
The new has_in_url_path method checks only if the substring is in the path of
the url.

Change-Id: I030d928d83e5c91cf26101221649a299d146747d
Closes-Bug: 1324948
Merge "Add user_domain_name in the user object"
Merge "Added url_path_replace and has_in_url_path methods"
Consider old version of token without 'user_domain_name' attr

Closes-Bug: #1363515
Change-Id: I252b99fba3c48a7ed27af1b7da3b1cb037555eb8
Work toward Python 3.4 support and testing

Change-Id: I56299bcb4f02dfab95b995f147c32623cf329fab
Fix Django 1.7 compat

In Debian, we are going to release Jessie with Django 1.7,
which has just been released. Therefore, compatibility is
important for us.

This patch, which the Debian package already carries, fixes
2 small compatibility issues with Django 1.7. It is safe to
use openstack_auth with these patches and a lower version of
Django, which makes it safe to apply this patch.

Change-Id: I564cde889c56e12fc0fc1347537e66b576605a0d
Adding django kwargs to login and logout views

The django.contrib.auth.views login and logout views take usefull parameters
which where dropped by the openstack_auth.views methods.

Added a TOKEN_TIMEOUT_MARGIN which allows to check token expiration minus a
time margin in seconds. This is usefull if you know a process will take a
certain time, you want to have your token still valid all this time (e.g. the
time it can take to render a view).

This patch is required for https://review.openstack.org/88220

Change-Id: I7508c40d6f1eaa2bf1eef5cc762052b15d6d9273
Closes-Bug: 1308918
Set DJANGO_SETTINGS_MODULE envvar in doc/source/conf.py

This fixes the issue that the doc is not generated properly
in gate-django_openstack_auth-docs job.

Change-Id: I5780ee32856a9b1fd4aed5b6a1a84d319aaf464e
Closes-Bug: #1369064
Updated from global requirements

Change-Id: I4e8dfa9842a568228aa033d99db95b84ae5e24bf
Merge "Work toward Python 3.4 support and testing"
Merge "Configurable token hashing algorithm"
Merge "Updated from global requirements"
Updated from global requirements

Change-Id: Idd78bf3bd89dd3c04782cde03ce2d5fdddfdf400
Merge "Fix Django 1.7 compat"
Merge "Set DJANGO_SETTINGS_MODULE envvar in doc/source/conf.py"
Merge "Updated from global requirements"