Package org.apache.camel.support
Class OAuthHelper
java.lang.Object
org.apache.camel.support.OAuthHelper
Helper for resolving OAuth tokens via the
OAuthClientAuthenticationFactory SPI.
This requires camel-oauth on the classpath.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringresolveOAuthToken(org.apache.camel.CamelContext context, String profileName) Resolves an OAuth bearer token using a named profile.
-
Method Details
-
resolveOAuthToken
public static String resolveOAuthToken(org.apache.camel.CamelContext context, String profileName) throws Exception Resolves an OAuth bearer token using a named profile. The profile properties are resolved fromcamel.oauth.<profileName>.*.- Parameters:
context- the CamelContextprofileName- the OAuth profile name- Returns:
- the bearer token string
- Throws:
Exception- if the factory is not found or token acquisition fails
-