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
- 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).
- In custom code, authenticate with a supported request type or implement and register an IdentityProvider<YourRequestType> via a build step.
- 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
- Install the extension owning the AuthenticationRequest type
- Register custom IdentityProviders at build time
- Prefer CDI-injected manager over manual construction
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
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
Related errors
- No AnonymousIdentityProvider registered. An instance of Anon
- Current principal ${principal} is not a JSON web token
- No producers for required item %s, step builder used: %s
- cycle detection failure report (dynamic CycleBuildException
- You must override this method or IdentityProvider.authentica
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/1ac8923e00c99700.
Report an issue: GitHub.