@classmethod
  @gen.coroutine
  def VerifyConfirmedIdentity(cls, client, identity_key, access_token):
    # Validate the identity and access token.
    Identity.ValidateKey(identity_key)
    identity = yield gen.Task(Identity.Query, client, identity_key, None, must_exist=False)
    if identity is None:
      raise InvalidRequestError(BAD_IDENTITY, identity_key=identity_key)

    yield identity.VerifyAccessToken(client, access_token)

    # Expire the access token now that it has been used.
    identity.expires = 0

    # Reset auth throttling limit since access token has been successfully redeemed.
    identity.auth_throttle = None

    identity.Update(client)

    raise gen.Return(identity)
Create new ToolProvider.
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/identity.py/Identity.VerifyConfirmedIdentity--crossover with--dataset/ETHPy150Open tophatmonocle/ims_lti_py/ims_lti_py/tool_provider.py/ToolProvider.__init__