@@ -370,7 +370,7 @@ public Uni<? extends ChallengeData> apply(ChallengeData data) {
370370
371371 private Uni <SecurityIdentity > authenticateWithAllMechanisms (SecurityIdentity identity , int i ,
372372 RoutingContext routingContext ) {
373- return getCredentialTransport ( mechanisms [i ], routingContext )
373+ return mechanisms [i ]. getCredentialTransport ( routingContext )
374374 .onItem ().transformToUni (new Function <HttpCredentialTransport , Uni <? extends SecurityIdentity >>() {
375375 @ Override
376376 public Uni <SecurityIdentity > apply (HttpCredentialTransport httpCredentialTransport ) {
@@ -425,7 +425,7 @@ public Uni<? extends HttpAuthenticationMechanism> apply(HttpAuthenticationMechan
425425
426426 private Uni <HttpAuthenticationMechanism > getPathSpecificMechanism (int index , RoutingContext routingContext ,
427427 String pathSpecificMechanism ) {
428- return getCredentialTransport ( mechanisms [index ], routingContext ).onItem ()
428+ return mechanisms [index ]. getCredentialTransport ( routingContext ).onItem ()
429429 .transform (new Function <HttpCredentialTransport , HttpAuthenticationMechanism >() {
430430 @ Override
431431 public HttpAuthenticationMechanism apply (HttpCredentialTransport t ) {
@@ -458,15 +458,6 @@ static void selectAuthMechanism(RoutingContext routingContext, String authMechan
458458 routingContext .put (AUTH_MECHANISM , authMechanism );
459459 }
460460
461- private static Uni <HttpCredentialTransport > getCredentialTransport (HttpAuthenticationMechanism mechanism ,
462- RoutingContext routingContext ) {
463- try {
464- return mechanism .getCredentialTransport (routingContext );
465- } catch (UnsupportedOperationException ex ) {
466- return Uni .createFrom ().item (mechanism .getCredentialTransport ());
467- }
468- }
469-
470461 private static void rememberAuthAttempted (RoutingContext routingContext ) {
471462 routingContext .put (ATTEMPT_AUTH_INVOKED , TRUE );
472463 }
@@ -489,7 +480,7 @@ private static boolean authenticatedWithDifferentAuthMechanism(String newAuthMec
489480 * when the selected mechanism is same as the one already used.
490481 */
491482 private static Uni <HttpCredentialTransport > rememberAuthMechScheme (HttpAuthenticationMechanism mech , RoutingContext event ) {
492- return getCredentialTransport (mech , event )
483+ return mech . getCredentialTransport (event )
493484 .onItem ().ifNotNull ().invoke (new Consumer <HttpCredentialTransport >() {
494485 @ Override
495486 public void accept (HttpCredentialTransport t ) {
0 commit comments