{"record":{"id":"6b7baed219f1c483","repo":"quarkusio/quarkus","slug":"filter-oidcrequestcontext-requestcontext-method-i","errorCode":null,"errorMessage":"filter(OidcRequestContext requestContext) method is not implemented","messagePattern":"filter\\(OidcRequestContext requestContext\\) method is not implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/OidcRequestFilter.java","lineNumber":69,"sourceCode":"                OidcRequestContextProperties contextProperties) {\n            super(request, requestBody, contextProperties);\n        }\n\n        public final Uni<Void> runBlocking(Runnable runnable) {\n            return OidcCommonUtils.runBlocking(runnable);\n        }\n    }\n\n    /**\n     * Filter OIDC request.\n     *\n     * @param requestContext the request context which provides access to the HTTP request headers and body, as well as context\n     *        properties.\n     * @deprecated use the {@link #filter(OidcRequestContext)} method instead\n     */\n    @Deprecated(since = \"3.31\", forRemoval = true)\n    default void filter(OidcRequestContext requestContext) {\n        throw new UnsupportedOperationException(\"filter(OidcRequestContext requestContext) method is not implemented\");\n    }\n\n    /**\n     * Filter OIDC request asynchronously.\n     * Blocking tasks can be run with the {@link OidcRequestFilterContext#runBlocking(Runnable)} method.\n     *\n     * @param requestContext the request context which provides access to the HTTP request headers and body, as well\n     *        as context properties.\n     * @return {@link Uni}; must not be null\n     */\n    default Uni<Void> filter(OidcRequestFilterContext requestContext) {\n        return Uni.createFrom().item(() -> {\n            filter((OidcRequestContext) requestContext);\n            return null;\n        });\n    }\n}\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/OidcRequestFilter.java#L51-L87","documentation":"OidcRequestFilter's deprecated synchronous filter(OidcRequestContext) default method throws UnsupportedOperationException when called. As of Quarkus 3.31 the old blocking-style filter is removed in favor of the asynchronous filter(OidcRequestContext, Runnable) method; calling the deprecated one means a custom filter was never migrated.","triggerScenarios":"A custom OidcRequestFilter implementation only overrides the deprecated filter(OidcRequestContext) method (or does not override anything and relies on the default), and the OIDC request pipeline invokes it during an OIDC request.","commonSituations":"Upgrading to Quarkus 3.31+ with an old custom request filter written for the pre-3.31 API; copy-pasted filter examples from older documentation.","solutions":["Implement the new asynchronous filter(OidcRequestContext<OidcRequestFilterContext>) method in your filter class","Use OidcRequestFilterContext.runBlocking(...) inside the new method if you need blocking work","Remove the deprecated filter override so the default throwing method is never selected"],"exampleFix":"// before\n@Override\npublic void filter(OidcRequestContext requestContext) { ... }\n// after\n@Override\npublic void filter(OidcRequestContext<OidcRequestFilterContext> requestContext) {\n    requestContext.context().runBlocking(() -> { ... });\n}","handlingStrategy":"type-guard","validationCode":"// ensure the filter implements the async API\nif (!(filter instanceof AsyncCapableRequestFilter)) {\n    throw new IllegalStateException(\"Filter must implement filter(OidcRequestContext) async variant\");\n}","typeGuard":"boolean usesAsyncApi(OidcRequestFilter f) {\n    var m = f.getClass().getMethod(\"filter\", OidcRequestContext.class);\n    return !m.isSynthetic(); // only true if actually overridden\n}","tryCatchPattern":"try {\n    oidcRequest.applyFilter(filter);\n} catch (UnsupportedOperationException e) {\n    LOG.error(\"Request filter not migrated: \" + e.getMessage());\n}","preventionTips":["After upgrading Quarkus, recompile to catch @Deprecated removals","Implement the new async filter signatures when deprecation warnings appear","Avoid copying filter examples older than 3.31"],"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"}