As a requirement for my existing project and trying to migrate some areas to vertx, I need to support multi JwtAuth providers used to issue tokens and accept them on my apis. For my project this is mandatory since we are using, for example, multiple realms on keycloak (which leaves to multiple public server keys to validate tokens by realm) and also external IDP's that we need to trust also. To accomplish this with vertx I did an arcaic approach:
- created a Custom MultiProvider JwtAuth Handler to which I pass the supported providers and will iterate thorough them all, collecting the results using a CompositureFuture.any() that has success if at least one has success;
- forked some code from JWTAuthHandlerImpl, modifying the authenticate method to return an Async result instead of fail/next routingContext
Do you have plans to add this to the project?
Is this the right approach to solve my problem?
Thank U
Filipe