Airflow Summit 2026 is coming August 31 - September 2 in Austin, TX. Register now to secure your spot!

airflow.providers.keycloak.auth_manager.middleware

Exceptions

AuthManagerRefreshTokenExpiredException

In case it is using a version of Airflow without AuthManagerRefreshTokenExpiredException.

Classes

KeycloakJWTMiddleware

Attach the Keycloak JWT tokens to the user.

Functions

get_cookie_path()

Module Contents

exception airflow.providers.keycloak.auth_manager.middleware.AuthManagerRefreshTokenExpiredException[source]

Bases: Exception

In case it is using a version of Airflow without AuthManagerRefreshTokenExpiredException.

class airflow.providers.keycloak.auth_manager.middleware.KeycloakJWTMiddleware(app, dispatch=None)[source]

Bases: starlette.middleware.base.BaseHTTPMiddleware

Attach the Keycloak JWT tokens to the user.

Gets the Keycloak JWT tokens from the request cookies and attaches them to the user. If the token is expired, attempt to refresh it using the refresh token.

async dispatch(request, call_next)[source]

Was this entry helpful?