示例#1
0
    def _validate(self):
        Validator.run(install=self.install, client_id=self.client_id, user=self.user)

        if not self._grant_belongs_to_install() or not self._sentry_app_user_owns_grant():
            raise APIUnauthorized

        if not self._grant_is_active():
            raise APIUnauthorized("Grant has already expired.")
示例#2
0
    def _validate(self):
        Validator.run(
            install=self.install,
            client_id=self.client_id,
            user=self.user,
        )

        self._validate_token_belongs_to_app()
示例#3
0
    def _validate(self):
        Validator.run(
            install=self.install,
            client_id=self.client_id,
            user=self.user,
        )

        if (
            not self._grant_belongs_to_install() or
            not self._sentry_app_user_owns_grant()
        ):
            raise APIUnauthorized

        if not self._grant_is_active():
            raise APIUnauthorized('Grant has already expired.')