diff options
| author | Jamie Lennox <jamielennox@redhat.com> | 2013-12-05 16:32:56 +1000 |
|---|---|---|
| committer | Dolph Mathews <dolph.mathews@gmail.com> | 2014-03-25 12:32:23 -0500 |
| commit | b07fbb91c6a6e7d1f37245be337f8f3913d10a9d (patch) | |
| tree | 948386fff7d56e51e8d8a2af2c6062938dca5626 /keystoneclient/auth/base.py | |
| parent | c1ddc5e199c2047f9714ab3fc223547c01ecef62 (diff) | |
| download | python-keystoneclient-b07fbb91c6a6e7d1f37245be337f8f3913d10a9d.tar.gz | |
Handle URLs via the session and auth_plugins
In the future clients will simply pass the service they expect to talk
to and the path. This will prevent every service trying to get their own
base urls from the service catalog individually.
This can later be extended to have the auth plugin actually contact the
URL from the service catalog which will let us have unversioned
endpoints in the catalog handled from a single location.
Change-Id: I80f0b5b1dbb45565fec09d1cb2c0552cfb9a72f5
blueprint: auth-plugin-endpoints
Diffstat (limited to 'keystoneclient/auth/base.py')
| -rw-r--r-- | keystoneclient/auth/base.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/keystoneclient/auth/base.py b/keystoneclient/auth/base.py index 68b151f..4456b0f 100644 --- a/keystoneclient/auth/base.py +++ b/keystoneclient/auth/base.py @@ -34,3 +34,22 @@ class BaseAuthPlugin(object): :param session: A session object so the plugin can make HTTP calls. :return string: A token to use. """ + + def get_endpoint(self, session, **kwargs): + """Return an endpoint for the client. + + There are no required keyword arguments to ``get_endpoint`` as a plugin + implementation should use best effort with the information available to + determine the endpoint. However there are certain standard options that + will be generated by the clients and should be used by plugins: + + - ``service_type``: what sort of service is required. + - ``interface``: what visibility the endpoint should have. + - ``region_name``: the region the endpoint exists in. + + :param Session session: The session object that the auth_plugin + belongs to. + + :returns string: The base URL that will be used to talk to the + required service or None if not available. + """ |
