52.9. コンポーネントを設定して認証を有効にする

Box を使用した認証では、次の例に示すように、コンポーネントで認証プロパティーを設定します。

BoxConfiguration configuration = new BoxConfiguration();
configuration.setClientId("clientId");
configuration.setClientSecret("clientSecret");
configuration.setUserName("userName");
configuration.setUserPassword("userPassword");

// add BoxComponent to Camel context
BoxComponent component = new BoxComponent(context);
component.setConfiguration(configuration);
context.addComponent("box", component);