'Get the current user session.'

@rest_utils.ajax()
def get(self, request):

    res = {k: getattr(request.user, k, None) for k in self.allowed_fields}
    if getattr(settings, 'ENABLE_CLIENT_TOKEN', True):
        res['token'] = request.user.token.id
    return res
