Keystone V3 Authentication Extension¶
This authentication extension enables simple authentication to Keystone V3 endpoints.
Sample Usage¶
import requests
from requests_cloud_auth import keystone
keystone_auth = keystone.KeystoneV3PasswordAuth(
endpoint='https://a.keystone.server',
username='demo',
password='cool',
project_name='my_project'
)
resp = requests.get('http://openstack_service/', auth=keystone_auth)
Extension API Documentation¶
-
class
requests_cloud_auth.keystone.
KeystoneV3PasswordAuth
(endpoint, username, password, project_name)¶ Authentication extension for Requests that supports Keystone V3
Parameters: - endpoint (str) – Keystone endpoint URI to authenticate to
- username (str) – Valid Keystone username
- password (str) – Valid Keystone password
- project_name (str) – Valid Keystone project name
Returns: Instance of KeystoneV3PasswordAuth
-
authenticate
()¶ Gets authentication credentials
Attempts to use cached credentials before making a remote call. Automatically called by requests when needed, but can be manually called when needed.