Module defining the Django auth backend class for the Keystone API.
openstack_auth.backend.
KeystoneBackend
[source]¶Django authentication backend for use with django.contrib.auth
.
get_all_permissions
(user, obj=None)[source]¶Returns a set of permission strings that the user has.
This permission available to the user is derived from the user’s Keystone “roles”.
The permissions are returned as "openstack.{{ role.name }}"
.
get_group_permissions
(user, obj=None)[source]¶Returns an empty set since Keystone doesn’t support “groups”.
get_user
(user_id)[source]¶Returns the current user from the session data.
If authenticated, this return the user object based on the user ID and session data.
Note
This required monkey-patching the contrib.auth
middleware
to make the request
object available to the auth backend class.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.