def METHOD_NAME(self, code, client):
    """Parse authorization code
    :param code: authorization code as JWS
    :param client: client
    :return: OAuth2Code or None
    """
    self.server.log.debug("Query authorization code:", code)
    jws = JsonWebSignature(algorithms=["RS256"])
    result = self.server.db.getKeySet()
    if not result["OK"]:
        raise Exception(result["Message"])
    err = None
    data = None
    for key in result["Value"].keys:
        try:
            data = jws.deserialize_compact(code, key)
        except Exception as e:
            err = e
    if err:
        self.server.log.error("Cannot get authorization code:", repr(err))
        return None
    try:
        item = OAuth2Code(json_loads(urlsafe_b64decode(data["payload"])))
        self.server.log.debug("Authorization code scope:", item.get_scope())
    except Exception as e:
        self.server.log.error("Cannot read authorization code:", repr(e))
        return None
    if not item.is_expired():
        return item