Announcement Announcement Module
Collapse
No announcement yet.
OAuth 2.0 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OAuth 2.0

    Hello everybody,
    I am new to oauth so sorry if my question does not make sense for you.
    I want to use oauth 2.0
    The only resource that I found is this one which I guess is oauth 1.0 and not 2.0.

    Where can I found the right one?

    By the way I found this as well which:
    First of all distributed from org.codehaus.spring-security-oauth and not the sprig-security itself.
    Secondly it's spring security version is <spring.security.version>3.0.2.RELEASE</spring.security.version>.

    I thought maybe the right one would be based on spring security 3.1 , which I really use in my project.

    Thanks for your response in advance

  • #2
    The links at http://www.springsource.org/spring-security-oauth (your first link) all look up to date, and there is plenty of mention of OAuth2 there. Did you have some issues finding the right links from there?

    The codehaus project is old - it was a precursor to the current Spring Security OAuth on github (https://github.com/SpringSource/spring-security-oauth).

    Comment


    • #3
      Since packages are named oauth and not oauth2.
      e.g. ClientDetailsService is undefined which is in org.springframework.security.oauth2.provider
      Do you have any idea?
      Last edited by sara_pm; Sep 21st, 2012, 04:24 AM.

      Comment


      • #4
        I'm currently trying to build the spring-security-oauth sample apps, but the test fails (version as of today).
        (Of course I can skip the test in order to build, but would be nice to have all tests succeed).

        Tests in error:
        writeValueAsStringWithNullScope(org.springframewor k.security.oauth2.common.TestOAuth2AccessTokenSeri alizer)

        Here are the surefire reports:
        http://pastebin.com/Mhpqepca
        http://pastebin.com/s1V12cnt

        Another thing I noticed about the wiki github (@sara_pm, maybe that's the reason for the package names):

        https://github.com/SpringSource/spri...wiki/downloads

        Shouldn't the artifactId not be spring-security-oauth2 instead of spring-security-oauth ? Would be good if it would be mentioned there. I found this info somewhere on StackOverflow (http://stackoverflow.com/questions/9...th2-is-there-a).
        Last edited by mathias.lin; Sep 22nd, 2012, 09:46 PM.

        Comment


        • #5
          All unit tests are working for me (and they also pass in the CI builds). Thanks for the bug report for the docs - pull requests are welcome in general (although this one is so trivial I'm not sure it's worth it).

          Comment


          • #6
            Dear all,
            I tried

            <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth</artifactId>
            <version>1.0.0.M3</version>
            </dependency>


            which worked fine and oauth 2.0 packages are inside, however when I change the version to :

            <dependency>
            <groupId>org.springframework.security.oauth</groupId>
            <artifactId>spring-security-oauth</artifactId>
            <version>1.0.0.M4</version>
            </dependency>


            I do not have oauth 2.0 packages inside anymore.
            @mathias.lin: using artifactId:spring-security-oauth2 caused "missing artifactId ..." Error!
            I need the latest version cause we already migrate to spring-security 3.1.
            Would please tell , what mistake did I made?
            best regards
            Sara

            Comment


            • #7
              M4 is old, old, old. Try RC2.

              Comment


              • #8
                Originally posted by mathias.lin View Post
                I'm currently trying to build the spring-security-oauth sample apps, but the test fails (version as of today).
                (Of course I can skip the test in order to build, but would be nice to have all tests succeed).

                Tests in error:
                writeValueAsStringWithNullScope(org.springframewor k.security.oauth2.common.TestOAuth2AccessTokenSeri alizer)
                I have the same problem.

                What I did:

                - Downloading Eclipse Juno EE
                - Installing maven and gitplugin in Eclipse
                - git clone from https://github.com/SpringSource/spri...rity-oauth.git
                - maven install in /spring-security-oauth2/pom.xml

                I'm using Windows 7 64bit.

                Any ideas what the reason for the problem is?

                Comment


                • #9
                  Are you saying you get a test failure? Can you provide some more detail on what is failing and how? It all works for me.

                  Comment


                  • #10
                    Here is my complete log after mvn install in /spring-security-oauth2/pom.xml

                    http://nopaste.me/paste/282772038508664bf53133

                    Results :

                    Tests in error:
                    writeValueAsStringWithNullScope(org.springframewor k.security.oauth2.common.TestOAuth2AccessTokenSeri alizer)

                    Tests run: 307, Failures: 0, Errors: 1, Skipped: 0


                    I'm using JDK 1.7.0_07

                    Comment


                    • #11
                      OK, I get the same with Java 7. Use Java 6 and it should be OK. I'll try and work out what the problem is.

                      Comment


                      • #12
                        Update: there's an incompatible change in the JDK 7 (compared to previous versions). This bug http://bugs.sun.com/bugdatabase/view...bug_id=5045147 was fixed and that pinged our test. It should be working now on master.

                        Comment


                        • #13
                          Thank you for the fix, but I doesn't work for me with Java 7.

                          After git pull I'm getting now:

                          Results :

                          Failed tests: writeValueAsStringWithNullScope(org.springframewor k.security.oauth2.common.TestOAuth2AccessTokenSeri alizer): Expected test to throw (exception with message a string containing "Scopes cannot be null or empty. Got [null]" and an instance of org.codehaus.jackson.map.JsonMappingException)

                          Tests run: 307, Failures: 1, Errors: 0, Skipped: 0


                          Java 6 is working.
                          Last edited by zendem; Oct 23rd, 2012, 10:56 AM.

                          Comment


                          • #14
                            Right. That should be fixed now.

                            Comment

                            Working...
                            X