Repository URL to install this package:
Version:
3.4.44 ▾
|
contego
/
home
/
tvault
/
.virtenv
/
lib
/
python2.7
/
site-packages
/
keystoneauth1
/
identity
/
base.pyc
|
---|
ó µEYc @ sö d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z e j e Z e j e j d e j f d Y Z d S( iÿÿÿÿN( t positional( t urllib( t _utils( t access( t discover( t exceptions( t plugint BaseIdentityPluginc B sÎ e Z d Z d e d Z e j d Z d Z d Z d Z d Z d d d d d i e d Z d Z d Z d Z d Z e d d Z d Z d Z d Z d Z RS( ix c C sJ t t | j | | _ d | _ | | _ i | _ t j | _ d S( N( t superR t __init__t auth_urlt Nonet auth_reft reauthenticatet _endpoint_cachet threadingt Lockt _lock( t selfR R ( ( sP /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/identity/base.pyR ' s c K s d S( sê Obtain a token from an OpenStack Identity Service. This method is overridden by the various token version plugins. This function should not be called independently and is expected to be invoked via the do_authenticate function. This function will be invoked if the AcessInfo object cached by the plugin is not valid. Thus plugins should always fetch a new AccessInfo when invoked. If you are looking to just retrieve the current auth data then you should use get_access. :param session: A session object that can be used for communication. :type session: keystoneauth1.session.Session :raises keystoneauth1.exceptions.response.InvalidResponse: The response returned wasn't appropriate. :raises keystoneauth1.exceptions.http.HttpError: An error from an invalid HTTP response. :returns: Token access information. :rtype: :class:`keystoneauth1.access.AccessInfo` N( ( R t sessiont kwargs( ( sP /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/identity/base.pyt get_auth_ref2 s c K s | j | j S( s Return a valid auth token. If a valid token is not present then a new one will be fetched. :param session: A session object that can be used for communication. :type session: keystoneauth1.session.Session :raises keystoneauth1.exceptions.http.HttpError: An error from an invalid HTTP response. :return: A valid token. :rtype: string ( t get_accesst auth_token( R R R ( ( sP /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/identity/base.pyt get_tokenL s c C s7 | j s t S| j s t S| j j | j r3 t St S( sÕ Return if the existing token needs to be re-authenticated. The token should be refreshed if it is about to expire. :returns: True if the plugin should fetch a new token. False otherwise. ( R t TrueR t Falset will_expire_soont MIN_TOKEN_LIFE_SECONDS( R ( ( sP /home/tvault/.virtenv/lib/python2.7/site-packages/keystoneauth1/identity/base.pyt _needs_reauthenticate\ s c K s8 | j &