Multi JwtAuth provider per route

38 views
Skip to first unread message

filipe.j...@gmail.com

unread,
Jan 19, 2018, 9:54:27 AM1/19/18
to vert.x
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

Paulo Lopes

unread,
Jan 22, 2018, 2:59:15 PM1/22/18
to vert.x

Filipe Delgado

unread,
Jan 24, 2018, 11:29:41 AM1/24/18
to vert.x
Shame on me, I didn´t saw this info. I'll give it a try. 

Thanks Paulo
Reply all
Reply to author
Forward
0 new messages