Results 1 to 2 of 2

Thread: How to use "oauth:consumer-details-service" element?

  1. #1
    Join Date
    Nov 2011
    Posts
    3

    Question How to use "oauth:consumer-details-service" element?

    Hi,

    I read the https://github.com/SpringSource/spri...th/wiki/oauth1 Wiki page. It does not explain the relationships of the elements.

    I have experience with OAuth, and I have used the
    Code:
    org.springframework.security.oauth.consumer.client.CoreOAuthConsumerSupport
    class to make access Twitter service. Now I want to use more configurations in my application.

    E.g.
    I have defined:
    Code:
      <oauth:consumer-details-service id="twitterSvc">
        <oauth:consumer name="twitter.com" key="k" secret="s">
          <oauth:url pattern="http://twitter.com" resources="statuses/hometimeline" />
        </oauth:consumer>
      </oauth:consumer-details-service>
    How do I define/provide the access token? How do I get an actual class to access the service?

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    I think to implement a consumer you need to use <oauth:resource/> and OAuth2RestTemplate (not <oauth:consumer/>, which I believe is defining a consumer registration with a provider). Look at the tonr sample for hints (https://github.com/SpringSource/spri...webapp/WEB-INF).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •