original_docstring: Return a token auth plugin object.
  
      :param token: the token to use for authentication.
  
      :param project_id: the project(ex. tenant) id to scope the auth.
  
      :returns: a token auth plugin object.
      
docstring: Return a token auth plugin object.
docstring_tokens: Return a token auth plugin object .
code: def token_auth(token, project_id=None, project_name=None,
                 project_domain_name='Default'):
      '''Return a token auth plugin object.
  
      :param token: the token to use for authentication.
  
      :param project_id: the project(ex. tenant) id to scope the auth.
  
      :returns: a token auth plugin object.
      '''
      token_kwargs = dict(
          auth_url=base.retrieve_auth_url(CONF.keystone.endpoint_type),
          token=token
      )
      if CONF.use_identity_api_v3:
          token_kwargs.update(dict(
              project_id=project_id,
              project_name=project_name,
              project_domain_name=project_domain_name,
          ))
          auth = keystone_identity.v3.Token(**token_kwargs)
      else:
          token_kwargs.update(dict(
              tenant_id=project_id,
              tenant_name=project_name,
          ))
          auth = keystone_identity.v2.Token(**token_kwargs)
      return auth
code_tokens: def token_auth ( token , project_id = None , project_name = None , project_domain_name = 'Default' ) : token_kwargs = dict ( auth_url = base . retrieve_auth_url ( CONF . keystone . endpoint_type ) , token = token ) if CONF . use_identity_api_v3 : token_kwargs . update ( dict ( project_id = project_id , project_name = project_name , project_domain_name = project_domain_name , ) ) auth = keystone_identity . v3 . Token ( ** token_kwargs ) else : token_kwargs . update ( dict ( tenant_id = project_id , tenant_name = project_name , ) ) auth = keystone_identity . v2 . Token ( ** token_kwargs ) return auth
short_docstring: Return a token auth plugin object.
short_docstring_tokens: Return a token auth plugin object .
comment: '''Return a token auth plugin object.
  
      :param token: the token to use for authentication.
  
      :param project_id: the project(ex. tenant) id to scope the auth.
  
      :returns: a token auth plugin object.
      '''