Skip to content

Commit

Permalink
fix: issues with MarkAuthzDoneMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Oct 20, 2023
1 parent aa31628 commit 4bd7147
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
10 changes: 2 additions & 8 deletions bento_lib/auth/middleware/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@

from ..exceptions import BentoAuthException
from ..types import EvaluationResultMatrix
from .mark_authz_done_mixin import MarkAuthzDoneMixin

__all__ = ["MarkAuthzDoneMixin", "BaseAuthMiddleware"]


class MarkAuthzDoneMixin(ABC):
@staticmethod
@abstractmethod
def mark_authz_done(request: Any): # pragma: no cover
pass
__all__ = ["BaseAuthMiddleware"]


class BaseAuthMiddleware(ABC, MarkAuthzDoneMixin):
Expand Down
12 changes: 12 additions & 0 deletions bento_lib/auth/middleware/mark_authz_done_mixin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from abc import abstractmethod
from typing import Any


__all__ = ["MarkAuthzDoneMixin"]


class MarkAuthzDoneMixin:
@staticmethod
@abstractmethod
def mark_authz_done(request: Any): # pragma: no cover
pass
2 changes: 1 addition & 1 deletion bento_lib/auth/types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Type

from ..auth.middleware.base import MarkAuthzDoneMixin
from ..auth.middleware.mark_authz_done_mixin import MarkAuthzDoneMixin

__all__ = [
"EvaluationResultMatrix",
Expand Down
1 change: 0 additions & 1 deletion bento_lib/responses/flask_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from functools import partial
from typing import Callable

from ..auth.middleware.flask import FlaskAuthMiddleware
from ..auth.types import MarkAuthzDoneType
from ..responses import errors

Expand Down

0 comments on commit 4bd7147

Please sign in to comment.