Hi,
Try following,
<property name="Authorization" expression="fn:concat( ',OAuth realm=',
',oauth_consumer_key=', get-property('yelp.oauth.consumerKey'),
',oauth_token=', get-property('yelp.oauth.accessToken'),
',oauth_signature_method=HMAC-SHA1',
',oauth_timestamp=', get-property('yelp.oauth.timestamp'),
',oauth_nonce=', get-property('yelp.oauth.nonce'),
',oauth_version=1.0',
',oauth_signature=', get-property('yelp.oauth.accessTokenSecret')
)" scope="transport" type="STRING"/>
Best Regards,
Malaka
On Mon, Jun 16, 2014 at 1:36 PM, Atchuthan Sithamparanathan <
[email protected]> wrote:
> Hi all,
>
> I have tried to create Yelp connector for ESB. Yelp API uses oauth 1.0a
> authentication and Authentication parameters are pass through HTTP header
> like this.
>
> GET /v2/business/yelp-san-francisco HTTP/1.1
> Host: api.yelp.com
> Authorization: OAuth
> realm="",oauth_consumer_key="xxxxxxxxxxxxxxxx",oauth_token="xxxxxxxxxxxxxxxx",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1402918725",oauth_nonce="vCTAQl",oauth_version="1.0",oauth_signature="xxxxxxxxxxxxxxxx"
> Cache-Control: no-cache
> Postman-Token: 338ad760-49be-df0b-a4ba-3eaa12586cd1
>
>
> I have tried like this in XML
>
> <property name="yelp.apiUri" value="http://api.yelp.com/v2/" />
> <property name="yelp.oauth.consumerKey" expression="$func:consumerKey" />
> <property name="yelp.oauth.consumerKeySecret"
> expression="$func:consumerKeySecret" />
> <property name="yelp.oauth.accessToken" expression="$func:accessToken" />
> <property name="yelp.oauth.accessTokenSecret"
> expression="$func:accessTokenSecret" />
>
> <property name="yelp.oauth.nonce" value="dummynonce"/>
> <property name="yelp.oauth.timestamp" value="dummytimestamp"/>
>
> <property name="Authorization" expression="fn:concat(
>
> ',OAuth realm=',
> ',oauth_consumer_key=', get-property('yelp.oauth.consumerKey'),
> ',oauth_token=', get-property('yelp.oauth.accessToken'),
> ',oauth_signature_method=HMAC-SHA1',
> ',oauth_timestamp=', get-property('yelp.oauth.timestamp'),
> ',oauth_nonce=', get-property('yelp.oauth.nonce'),
> ',oauth_version=1.0',
> ',oauth_signature=', get-property('yelp.oauth.accessTokenSecret')
>
> )"/>
>
> But it didn't work. How can I implement it?
>
> --
> Thanks & Regards.
> Sithamparanathan Atchuthan
> Mobile +94775002262
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
Best Regards,
Malaka Silva
Senior Tech Lead
M: +94 777 219 791
Tel : 94 11 214 5345
Fax :94 11 2145300
Skype : malaka.sampath.silva
LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77
Blog : http://mrmalakasilva.blogspot.com/
WSO2, Inc.
lean . enterprise . middleware
http://www.wso2.com/
http://www.wso2.com/about/team/malaka-silva/
<http://wso2.com/about/team/malaka-silva/>
Save a tree -Conserve nature & Save the world for your future. Print this
email only if it is absolutely necessary.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev