quarkusio/quarkus · error · UnsupportedOperationException
filter(OidcResponseContext responseContext) method is not im
Error message
filter(OidcResponseContext responseContext) method is not implemented
What it means
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.
Source
Thrown at extensions/oidc-common/runtime/src/main/java/io/quarkus/oidc/common/OidcResponseFilter.java:73
public OidcResponseFilterContext(OidcRequestContextProperties requestProperties, int statusCode,
MultiMap responseHeaders, Buffer responseBody) {
super(requestProperties, statusCode, responseHeaders, responseBody);
}
public final Uni<Void> runBlocking(Runnable runnable) {
return OidcCommonUtils.runBlocking(runnable);
}
}
/**
* Filter OIDC responses.
*
* @param responseContext the response context which provides access to the HTTP response status code, headers and body.
* @deprecated use the {@link #filter(OidcResponseContext)} method instead
*/
@Deprecated(since = "3.31", forRemoval = true)
default void filter(OidcResponseContext responseContext) {
throw new UnsupportedOperationException("filter(OidcResponseContext responseContext) method is not implemented");
}
/**
* Filter OIDC responses asynchronously.
* Blocking tasks can be run with the {@link OidcResponseFilterContext#runBlocking(Runnable)} method.
*
* @param responseContext the response context which provides access to the HTTP response status code, headers and body.
* @return {@link Uni}
*/
default Uni<Void> filter(OidcResponseFilterContext responseContext) {
return Uni.createFrom().item(() -> {
filter((OidcResponseContext) responseContext);
return null;
});
}
}
View on GitHub (pinned to e1c734241f)
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
Example fix
// before
@Override
public void filter(OidcResponseContext responseContext) { ... }
// after
@Override
public void filter(OidcRequestContext<OidcResponseFilterContext> requestContext,
OidcResponseContext<OidcResponseFilterContext> responseContext) {
responseContext.context().runBlocking(() -> { ... });
} Defensive patterns
Strategy: type-guard
Validate before calling
// ensure the filter implements the async API
if (!(filter instanceof AsyncCapableResponseFilter)) {
throw new IllegalStateException("Filter must implement the async response filter method");
} Type guard
boolean usesAsyncApi(OidcResponseFilter f) {
var m = f.getClass().getMethod("filter", OidcResponseContext.class);
return !m.isSynthetic();
} Try / catch
try {
oidcResponse.applyFilter(filter);
} catch (UnsupportedOperationException e) {
LOG.error("Response filter not migrated: " + e.getMessage());
} Prevention
- 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
When it happens
Trigger: A custom OidcResponseFilter only overrides the deprecated filter(OidcResponseContext) method, and the OIDC pipeline invokes it while processing an OIDC response.
Common situations: Migration to Quarkus 3.31+ with filters written against the old response-filter API; examples copied from outdated blog posts or docs.
Related errors
- filter(OidcRequestContext requestContext) method is not impl
- 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/3340d56f6ac9f23a.
Report an issue: GitHub.