Announcement Announcement Module
Collapse
No announcement yet.
How to send additional parameters using OAuth1 and ProviderSignInController Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to send additional parameters using OAuth1 and ProviderSignInController

    Hi ,
    I am working on spring social flickr project. Flickr uses OAuth1 authentication. During authorize i need to send permission parameter ( 'perms' ) having values like ( 'read' , 'write' and 'delete'). I have checked that we can send additional parameter ('scope') through OAuth2 using getOAuth2Parameters() function in ConnectSupport.java. But there seems no provision to send additional parameter in OAuth1 as ConnectSupport.java sending 'null' as in buildOAuthUrl(connectionFactory, request, null). Is there any way I can send 'perms' parameter through ProviderSignInController?

  • #2
    First, I'm glad to hear that you're working on a Spring Social Flickr project! It's always exciting to hear that the community is pitching in to bring Spring Social to new providers such as Flickr. Is there a GitHub URL (or other URL) that I can link to from the Spring Social homepage to make others aware of your work (and maybe you'll get some feedback/assistance from the community)?

    If you were asking about ConnectController, then I would say that you can provide custom parameters by implementing a ConnectInterceptor for Flickr that adds whatever you want to the parameters map given to preConnect(). But you're asking about ProviderSignInController, which currently has no support for interceptors. Furthermore, as you are creating a provider extension for Spring Social, it may be argued that asking the developer to do an extra configuration step for Flickr may be unwarranted (I'll have to think on this some more before I decide).

    In either case, you are right: ProviderSignInController has no direct provision for passing such parameters. https://jira.springsource.org/browse/SOCIAL-255 talks about adding interceptor support for ProviderSignInController and I was planning on starting on that one soon. I also just created https://jira.springsource.org/browse/SOCIAL-306 to capture the need for sending custom parameters to buildOAuthUrl().

    Keep an eye on these 2 issues and I'll let you know (probably on this thread) when I have something for you to try out.

    Comment


    • #3
      Hi habuma,

      Here is GitHub URL for spring social flickr :
      https://github.com/ranjan-rk/spring-social-flickr
      I think any of two methods you specify will solve the issue. Thanks for creating new jiira SOCIAL-306 this is exactly what i require. I will keep an eye on these 2 issues and in mean time i continue to work on converting the flickr api.

      Comment

      Working...
      X