def auth(self, *args, **kw):
        if self._meta.auth_mech in self.auth_mechanizms:
            func = getattr(self, '_auth_via_%s' % self._meta.auth_mech)
            func(*args, **kw)
        else:
            raise exc.dRestAPIError("Unknown TastyPie auth mechanism.")
Authenticate the request, determined by Meta.auth_mech.  Arguments
dataset/ETHPy150Open datafolklabs/drest/drest/api.py/TastyPieAPI.auth