Skip to content

angee.iam.middleware

IAM HTTP middleware.

BearerTokenCsrfExemptMiddleware

python
class BearerTokenCsrfExemptMiddleware()

Mark bearer-token requests as CSRF-exempt.

Browser session requests remain protected by Django's CSRF middleware. Bearer clients present credentials explicitly through the Authorization header, so they follow the token-authentication CSRF shape.

__init__

python
def __init__(get_response: Callable[[Any], Any]) -> None

Store the next middleware or view callable.

__call__

python
def __call__(request: Any) -> Any

Exempt syntactic Bearer requests before CSRF's view check runs.

Released under the AGPL-3.0 License.