Class OAuthHelper

java.lang.Object
org.apache.camel.support.OAuthHelper

public final class OAuthHelper extends Object
Helper for resolving OAuth tokens via the OAuthClientAuthenticationFactory SPI.

This requires camel-oauth on the classpath.

  • 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 from camel.oauth.<profileName>.*.

      Parameters:
      context - the CamelContext
      profileName - the OAuth profile name
      Returns:
      the bearer token string
      Throws:
      Exception - if the factory is not found or token acquisition fails