quarkusio/quarkus · error · UnsupportedOperationException
filter(OidcRequestContext requestContext) method is not impl
Error message
filter(OidcRequestContext requestContext) method is not implemented
What it means
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.
Source
Thrown at extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/OidcRequestFilter.java:69
OidcRequestContextProperties contextProperties) {
super(request, requestBody, contextProperties);
}
public final Uni<Void> runBlocking(Runnable runnable) {
return OidcCommonUtils.runBlocking(runnable);
}
}
/**
* Filter OIDC request.
*
* @param requestContext the request context which provides access to the HTTP request headers and body, as well as context
* properties.
* @deprecated use the {@link #filter(OidcRequestContext)} method instead
*/
@Deprecated(since = "3.31", forRemoval = true)
default void filter(OidcRequestContext requestContext) {
throw new UnsupportedOperationException("filter(OidcRequestContext requestContext) method is not implemented");
}
/**
* Filter OIDC request asynchronously.
* Blocking tasks can be run with the {@link OidcRequestFilterContext#runBlocking(Runnable)} method.
*
* @param requestContext the request context which provides access to the HTTP request headers and body, as well
* as context properties.
* @return {@link Uni}; must not be null
*/
default Uni<Void> filter(OidcRequestFilterContext requestContext) {
return Uni.createFrom().item(() -> {
filter((OidcRequestContext) requestContext);
return null;
});
}
}
View on GitHub (pinned to e1c734241f)
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
Example fix
// before
@Override
public void filter(OidcRequestContext requestContext) { ... }
// after
@Override
public void filter(OidcRequestContext<OidcRequestFilterContext> requestContext) {
requestContext.context().runBlocking(() -> { ... });
} Defensive patterns
Strategy: type-guard
Validate before calling
// ensure the filter implements the async API
if (!(filter instanceof AsyncCapableRequestFilter)) {
throw new IllegalStateException("Filter must implement filter(OidcRequestContext) async variant");
} Type guard
boolean usesAsyncApi(OidcRequestFilter f) {
var m = f.getClass().getMethod("filter", OidcRequestContext.class);
return !m.isSynthetic(); // only true if actually overridden
} Try / catch
try {
oidcRequest.applyFilter(filter);
} catch (UnsupportedOperationException e) {
LOG.error("Request filter not migrated: " + e.getMessage());
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- filter(OidcResponseContext responseContext) method is not im
- Use the 'OidcClientCommonConfigBuilder.CredentialsBuilder#bu
- AnnotationTransformation is not an AnnotationsTransformer: $
- AnnotationTransformation is not an AnnotationsTransformer: "
- Not Allowed
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/6b7baed219f1c483.
Report an issue: GitHub.