code: def auth(username, password):
      '''
      Try and authenticate
      '''
      try:
          keystone = client.Client(username=username, password=password,
                                   auth_url=get_auth_url())
          return keystone.authenticate()
      except (AuthorizationFailure, Unauthorized):
          return Falsf auth(username, password):
      '''
      Try and authenticate
      '''
      try:
          keystone = client.Client(username=username, password=password,
                                   auth_url=get_auth_url())
          return keystone.authenticate()
      except (AuthorizationFailure, Unauthorized):
          return False
docs: Try and authenticate