luigidemasi commented on code in PR #23866:
URL: https://github.com/apache/camel/pull/23866#discussion_r3380894110


##########
core/camel-support/src/main/java/org/apache/camel/support/OAuthHelper.java:
##########
@@ -47,4 +52,55 @@ public static String resolveOAuthToken(CamelContext context, 
String profileName)
                 "camel-oauth");
         return factory.resolveToken(context, profileName);
     }
+
+    /**
+     * Resolves the OAuth token validation factory.
+     *
+     * @param  context the CamelContext
+     * @return         the token validation factory
+     * @since          4.21
+     */
+    public static OAuthTokenValidationFactory 
resolveOAuthTokenValidationFactory(CamelContext context) {

Review Comment:
   Good point, I changed this to prefer the Camel registry before falling back 
to the bootstrap service. It now supports 
   
   ```
   camel.oauth.<profile>.validation-factory=#bean:...
   ```
   
   then camel.oauth.validation-factory, then registry lookup by name/type, and 
only then the bootstrap service. 
   A configured bean also fails fast if it is missing or not an 
OAuthTokenValidationFactory.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to