mulesoft/mule-devkit — Issue #64: OAuthAccessToken should be set on connector and not the @Processor method
Author: dandiep
Created: 2012-01-09 03:23:29+00:00
State: open

The OAuthAccessToken should be on connector not processor method. There are a couple reasons I can think of for this:

1) This maps to how client libraries work. Take for instance the google or twitter4j java client libraries. You set the access token once. By passing it in every method, it's difficult to work with these libraries correctly. And if you were going to write your own client, you'd often initialize the logic for sending the token in a single spot anyway.

2) It's repetitive and time consuming to write.

3) This maps more closely to our non-oauth model where credentials are passed in once and shared for the connector.