从request中得到登录身份identity

async def identify(self, request):
        """ 从request中得到登录身份identity """
        if hasattr(request, '_session_identity'):
            return request._session_identity

        token = request.cookies.get(self._cookie_name)
        if token is None:
            token = getAuthorizationTokenFromHeader(request)
            if token is None:
                raise Unauthorized('无认证身份')

        identity = await self.decode_jwt(token)
        setattr(request, '_session_identity', identity)

        # if identity.client_id.startsWith('spa|'):
        #     checkCRSFToken(request)

        return identity