{"record":{"id":"3340d56f6ac9f23a","repo":"quarkusio/quarkus","slug":"filter-oidcresponsecontext-responsecontext-method","errorCode":null,"errorMessage":"filter(OidcResponseContext responseContext) method is not implemented","messagePattern":"filter\\(OidcResponseContext responseContext\\) method is not implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/OidcResponseFilter.java","lineNumber":73,"sourceCode":"        public OidcResponseFilterContext(OidcRequestContextProperties requestProperties, int statusCode,\n                MultiMap responseHeaders, Buffer responseBody) {\n            super(requestProperties, statusCode, responseHeaders, responseBody);\n        }\n\n        public final Uni<Void> runBlocking(Runnable runnable) {\n            return OidcCommonUtils.runBlocking(runnable);\n        }\n    }\n\n    /**\n     * Filter OIDC responses.\n     *\n     * @param responseContext the response context which provides access to the HTTP response status code, headers and body.\n     * @deprecated use the {@link #filter(OidcResponseContext)} method instead\n     */\n    @Deprecated(since = \"3.31\", forRemoval = true)\n    default void filter(OidcResponseContext responseContext) {\n        throw new UnsupportedOperationException(\"filter(OidcResponseContext responseContext) method is not implemented\");\n    }\n\n    /**\n     * Filter OIDC responses asynchronously.\n     * Blocking tasks can be run with the {@link OidcResponseFilterContext#runBlocking(Runnable)} method.\n     *\n     * @param responseContext the response context which provides access to the HTTP response status code, headers and body.\n     * @return {@link Uni}\n     */\n    default Uni<Void> filter(OidcResponseFilterContext responseContext) {\n        return Uni.createFrom().item(() -> {\n            filter((OidcResponseContext) responseContext);\n            return null;\n        });\n    }\n\n}\n","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/OidcResponseFilter.java#L55-L91","documentation":"OidcResponseFilter's deprecated synchronous filter(OidcResponseContext) default method throws UnsupportedOperationException when called. Since Quarkus 3.31 the deprecated method is scheduled for removal and filters must implement the asynchronous filter(OidcRequestContext, OidcResponseContext, Runnable) signature instead.","triggerScenarios":"A custom OidcResponseFilter only overrides the deprecated filter(OidcResponseContext) method, and the OIDC pipeline invokes it while processing an OIDC response.","commonSituations":"Migration to Quarkus 3.31+ with filters written against the old response-filter API; examples copied from outdated blog posts or docs.","solutions":["Implement the new asynchronous filter method that receives both request and response contexts","Move any blocking logic into OidcResponseFilterContext.runBlocking(...)","Delete the deprecated override so it cannot be invoked"],"exampleFix":"// before\n@Override\npublic void filter(OidcResponseContext responseContext) { ... }\n// after\n@Override\npublic void filter(OidcRequestContext<OidcResponseFilterContext> requestContext,\n        OidcResponseContext<OidcResponseFilterContext> responseContext) {\n    responseContext.context().runBlocking(() -> { ... });\n}","handlingStrategy":"type-guard","validationCode":"// ensure the filter implements the async API\nif (!(filter instanceof AsyncCapableResponseFilter)) {\n    throw new IllegalStateException(\"Filter must implement the async response filter method\");\n}","typeGuard":"boolean usesAsyncApi(OidcResponseFilter f) {\n    var m = f.getClass().getMethod(\"filter\", OidcResponseContext.class);\n    return !m.isSynthetic();\n}","tryCatchPattern":"try {\n    oidcResponse.applyFilter(filter);\n} catch (UnsupportedOperationException e) {\n    LOG.error(\"Response filter not migrated: \" + e.getMessage());\n}","preventionTips":["Migrate response filters to the request+response async signature","Treat @Deprecated(since=\"3.31\", forRemoval=true) as an immediate action item","Add a unit test that invokes the filter to surface default-method throws"],"tags":["oidc","deprecated-api","unsupported-operation"],"backgroundTag":"deprecated-default-method-not-implemented","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}