def get_primitive(self, primitive):
        if primitive == 'USER':
            auth = self.request.authorization and self.request.authorization[1]
            userpass = (auth and base64.b64decode(auth)) or None
            return (userpass and userpass.split(":")[0]) or None
        if primitive == 'ALL_DATA':
            return self.get_raw_data()
        if primitive == 'LOGGED_IN_USER':
            return self.request.user
        if primitive == 'RAW_INVOCATION_ARGS':
            return unquote('/'.join(self.path_args))

        raise Exception("Primitive not supported")
dataset/ETHPy150Open priestc/giotto/giotto/controllers/http.py/HTTPController.get_primitive/original