Announcement Announcement Module
Collapse
No announcement yet.
How to use "oauth:consumer-details-service" element? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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).

    Comment

    Working...
    X