    async def user_for_token(self, token):
        """Retrieve the user for a given token, via /hub/api/user"""

        req = HTTPRequest(
            self.settings['user_url'], headers={'Authorization': f'token {token}'}
        )
        response = await AsyncHTTPClient().fetch(req)
        return json.loads(response.body.decode('utf8', 'replace'))
Retrieve the user for a given token, via /hub/api/user
examples/external-oauth/whoami-oauth-basic.py