(bless_cache)
Returns cached Vault auth token if available, otherwise None
    :param bless_cache: Bless cache object
    :return: Vault auth token or None if no valid token cached
Returns cached Vault auth token if available, otherwise None
    :param bless_cache: Bless cache object
    :return: Vault auth token or None if no valid token cached
Returns cached Vault auth token if available otherwise None : param bless_cache : Bless cache object : return : Vault auth token or None if no valid token cached
def get_cached_auth_token(bless_cache):
    """
    Returns cached Vault auth token if available, otherwise None
    :param bless_cache: Bless cache object
    :return: Vault auth token or None if no valid token cached
    """
    vault_creds = bless_cache.get('vault_creds')
    if vault_creds is None or vault_creds['expiration'] is None:
        return None
    else:
        expiration = vault_creds['expiration']
        if datetime.datetime.utcnow() < datetime.datetime.strptime(expiration, '%Y%m%dT%H%M%SZ'):
            logging.debug(
                'Using cached vault token, good until {}'.format(expiration))
            return vault_creds['token']
        else:
            return None
def get_cached_auth_token ( bless_cache ) : vault_creds = bless_cache . get ( 'vault_creds' ) if vault_creds is None or vault_creds [ 'expiration' ] is None : return None else : expiration = vault_creds [ 'expiration' ] if datetime . datetime . utcnow ( ) < datetime . datetime . strptime ( expiration , '%Y%m%dT%H%M%SZ' ) : logging . debug ( 'Using cached vault token, good until {}' . format ( expiration ) ) return vault_creds [ 'token' ] else : return None