quarkusio/quarkus · error · IllegalArgumentException

No IdentityProviders were registered to handle Authenticatio

Error message

No IdentityProviders were registered to handle AuthenticationRequest %s

What it means

QuarkusIdentityProviderManagerImpl looks up registered IdentityProvider instances keyed by the AuthenticationRequest subclass. When no provider is registered for the concrete request class, authentication cannot proceed and an IllegalArgumentException is thrown. The provider registry is populated at build time by security extensions.

Source

Thrown at extensions/security/runtime/src/main/java/io/quarkus/security/runtime/QuarkusIdentityProviderManagerImpl.java:107

                        }
                    });
        }
        return authenticated;
    }

    /**
     * Attempts to create an authenticated identity for the provided {@link AuthenticationRequest} in a blocking manner
     * <p>
     * If authentication succeeds the resulting identity will be augmented with any configured {@link SecurityIdentityAugmentor}
     * instances that have been registered.
     *
     * @param request The authentication request
     * @return The first identity provider that was registered with this type
     */
    public SecurityIdentity authenticateBlocking(AuthenticationRequest request) {
        var providers = this.providers.get(request.getClass());
        if (providers == null) {
            throw new IllegalArgumentException(
                    "No IdentityProviders were registered to handle AuthenticationRequest " + request);
        }
        return handleProviders(providers, request).await().indefinitely();
    }

    private Uni<SecurityIdentity> handleProviders(
            List<IdentityProvider<? extends AuthenticationRequest>> providers, AuthenticationRequest request) {
        return handleProvider(0, providers, request)
                .onItem()
                .transformToUni(new Function<SecurityIdentity, Uni<? extends SecurityIdentity>>() {
                    @Override
                    public Uni<? extends SecurityIdentity> apply(SecurityIdentity securityIdentity) {
                        return handleIdentityFromProvider(0, securityIdentity, request.getAttributes());
                    }
                });
    }

    private Uni<SecurityIdentity> handleProvider(int pos, List<IdentityProvider<? extends AuthenticationRequest>> providers,

View on GitHub (pinned to e1c734241f)

Solutions

  1. Ensure the extension that owns the AuthenticationRequest type is present and configured (e.g. quarkus-oidc, or quarkus-elytron-security / quarkus-security with a registered IdentityProvider).
  2. In custom code, authenticate with a supported request type or implement and register an IdentityProvider<YourRequestType> via a build step.
  3. Verify with quarkus.security that the provider is registered; in tests, add the provider to the builder before build().

Example fix

// before
SecurityIdentity identity = ipm.authenticateBlocking(new TokenAuthenticationRequest(token)); // no provider for this type
// after
SecurityIdentity identity = ipm.authenticateBlocking(new AuthenticationRequestImpl(username, password));
// or register:
// builder.addProvider(new MyCustomIdentityProvider());
Defensive patterns

Strategy: try-catch

Validate before calling

// verify provider availability when possible
boolean hasProvider = providersStream().anyMatch(p -> p.getRequestType().equals(request.getClass()));
if (!hasProvider) throw new IllegalArgumentException("no provider for " + request.getClass());

Try / catch

try {
    SecurityIdentity id = ipm.authenticateBlocking(request);
} catch (IllegalArgumentException e) {
    if (e.getMessage().startsWith("No IdentityProviders")) {
        // fall back / report unsupported auth mechanism
    } else throw e;
}

Prevention

When it happens

Trigger: Calling identityProviderManager.authenticateBlocking(request) (or the reactive variant) with an AuthenticationRequest type for which no IdentityProvider was registered — e.g. passing a custom request type or a request type from an extension that is not installed.

Common situations: Manually invoking the IdentityProviderManager in custom filters with a wrong request type; an extension providing authentication (e.g. OIDC, properties-based IdentityProvider) is missing from the app; tests constructing a manager without providers.

Understand the failure class

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/1ac8923e00c99700. Report an issue: GitHub.