diff --git a/pykube/http.py b/pykube/http.py index 54c4478..92fd9e0 100644 --- a/pykube/http.py +++ b/pykube/http.py @@ -120,7 +120,11 @@ def send(self, request, **kwargs): auth_config.get("expiry"), config, ) - # @@@ support oidc + elif auth_provider.get("name") == "oidc": + auth_config = auth_provider.get("config", {}) + # @@@ support token refresh + if "id-token" in auth_config: + request.headers["Authorization"] = "Bearer {}".format(auth_config["id-token"]) elif "client-certificate" in config.user: kwargs["cert"] = ( config.user["client-certificate"].filename(),