Exemplo n.º 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.")
Exemplo n.º 2
0
    def _validate(self):
        Validator.run(
            install=self.install,
            client_id=self.client_id,
            user=self.user,
        )

        self._validate_token_belongs_to_app()
Exemplo n.º 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.')