It's all about the answers!

Ask a question

version 4.0.2 and oAuth


helene højrup (231912) | asked May 08 '13, 10:05 a.m.
edited May 08 '13, 10:07 a.m.
Hi
I've been struggling a lot with oauth (example 6 in the OSLC workshop.)

Today I found out, that I was able to log in if I used our real server instead of our test server. Investigating this further I found out that the real server is still on version 4.0.0.1 and the test server is on 4.0.2.  

Real rm server (rootservices)
          <oslc_rm:majorVersion>3</oslc_rm:majorVersion>
          <oslc_rm:version>3.0.1.0</oslc_rm:version>
          <oslc_rm:buildVersion>4.0.0.1 (I20120910_1852)
          <rm:rrcExtensions>0.1.3-0.1.5</rm:rrcExtensions>

Test rm server (rootservices)
          <oslc_rm:majorVersion>4</oslc_rm:majorVersion>
          <oslc_rm:version>4.0.1.1</oslc_rm:version>
          <oslc_rm:buildVersion>4.0.2 (I20130222_1706)
          <rm:rrcExtensions>0.1.3-0.1.5</rm:rrcExtensions>


Could these different versions cause my login problems?




Comments
Rosa Naranjo commented May 09 '13, 5:13 p.m.
FORUM MODERATOR / JAZZ DEVELOPER

I tried Example05 against a 4.0.2. server and the oAuth works fine.  I don't have an Example06.  What version of the OSLC workshop code are you using? The last update was made in Feb 2013.  https://jazz.net/wiki/bin/view/Main/OSLCWorkshopDownload
What login problems do you have? If you set DEBUG=true, the sample should print out headers as it goes through the doOauth method.


helene højrup commented May 10 '13, 8:04 a.m.

Sorry I meant lap 6 example 3.
My outputs are almost the same when I run my test server and my real server. The only difference beside the last error is the max-age and expire dates.

Test server: Max-Age=600; Expires=Wed, 08-May-2013 11:56:36
Real server: Max-Age=864000; Expires=Sat, 18-May-2013 07:12:57

The outputs follow in my next comment

<o:p> </o:p>






2 answers



permanent link
helene højrup (231912) | answered May 10 '13, 8:05 a.m.
>> GET(1) https://myRMtestServer:9443/rm/rootservices
>> Response Headers:
      - X-RRS-servername: "0"
      - OSLC-Core-Version: 2.0
      - Content-Type: application/rdf+xml
      - Expires: Wed, 08 May 2013 13:51:35 CEST
      - Cache-Control: public
      - Content-Language: en-US
      - Transfer-Encoding: chunked
      - Date: Wed, 08 May 2013 11:46:35 GMT
      - Server: WebSphere Application Server/7.0
>> GET(1) https://myRMtestServer:9443/rm/discovery/RMCatalog
08-05-2013 13:46:36 org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: jfs-request-token-f26c3b80e00d4a249ec1f68d06e2fd84="JqW6Ne9ET11CJBp4QbLYYw2ErAF6JmpZKKnN12dnZI"; Version=1; Max-Age=600; Expires=Wed, 08-May-2013 11:56:36 GMT; Path=/rm". Unable to parse expires attribute: Wed
08-05-2013 13:46:36 org.apache.http.impl.client.DefaultRequestDirector handleResponse
WARNING: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm=https://myJTSserver:9443/jts/oauth-authorize}
>> Response Headers:
      - Set-Cookie: jfs-oauth-access-token0=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Path=/rm
      - Set-Cookie: jfs-oauth-access_token-secret0=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Path=/rm
      - Set-Cookie: jfs-request-token-f26c3b80e00d4a249ec1f68d06e2fd84="JqW6Ne9ET11CJBp4QbLYYw2ErAF6JmpZKKnN12dnZI"; Version=1; Max-Age=600; Expires=Wed, 08-May-2013 11:56:36 GMT; Path=/rm
      - X-jazz-web-oauth-url: https://myJTSserver:9443/jts/oauth-authorize?oauth_token=f26c3b80e00d4a249ec1f68d06e2fd84
      - WWW-Authenticate: OAuth realm=https://myJTSserver:9443/jts/oauth-authorize
      - Content-Type: text/html
      - Content-Length: 328
      - Content-Language: en-US
      - Date: Wed, 08 May 2013 11:46:35 GMT
      - Server: WebSphere Application Server/7.0
      - Expires: Thu, 01 Dec 1994 16:00:00 GMT
      - Cache-Control: no-cache="set-cookie, set-cookie2"
>> Response Headers:
      - X-com-ibm-team-repository-web-auth-msg: authrequired
      - Location: https://myJTSserver:9443/jts/authenticated/identity?redirectPath=%2Fjts%2Foauth-authorize%3Foauth_token%3Df26c3b80e00d4a249ec1f68d06e2fd84
      - Content-Language: en-US
      - Content-Length: 0
      - Date: Wed, 08 May 2013 11:46:35 GMT
      - Server: WebSphere Application Server/7.0
>> Response Headers:
      - Location: https://myJTSserver:9443/jts/auth/authrequired
      - Content-Language: en-US
      - Content-Length: 0
      - Set-Cookie: WASReqURL=https://:9443/jts/authenticated/identity?redirectPath=%252Fjts%252Foauth-authorize%253Foauth_token%253Df26c3b80e00d4a249ec1f68d06e2fd84; Path=/
      - Date: Wed, 08 May 2013 11:46:35 GMT
      - Server: WebSphere Application Server/7.0
      - Expires: Thu, 01 Dec 1994 16:00:00 GMT
      - Cache-Control: no-cache="set-cookie, set-cookie2"
>> POST https://myJTSserver:9443/jts/j_security_check
      - Date: Wed, 08 May 2013 11:46:35 GMT
      - Server: WebSphere Application Server/7.0
      - Location: https://myJTSserver:9443/jts/authenticated/identity?redirectPath=%2Fjts%2Foauth-authorize%3Foauth_token%3Df26c3b80e00d4a249ec1f68d06e2fd84
      - Content-Language: en-US
      - Content-Length: 0
      - Set-Cookie: WASReqURL=""; Expires=Thu, 01-Dec-94 16:00:00 GMT; Path=/
      - Set-Cookie: LtpaToken2=0pgvc5TkvoQv5RApoYT0PhzrPABynVGCv7VMfJ9kJJv1vXCiran8xxsupv8BXN9fpYpDccTe7Jf29ZuyIpqqQE8u1qD+2WUl22neBZENi1TOE8kO7KsZixvD459NfHBobJU16KHFaTBh7wzWxKLI3unHTeLR2lqknmg27ldlaqpRt+bkm6IF8Pug4TKOSJGE+jqow5QtinBRt8zQT0Foyxd5qLTIiDCpELyY184fPDJC1ec2SKQXHlMz404iJJLcUztAAsXYTTba2C6h4zGYkV6h3qG+zsRGxWD+R2ziT2l6+jOQQE2tET+62uu9T2ISIjk/313QkjPuBMbrpw6ayxBxGDKcRykyO/ALqiJH+yvhQ7Ba3yCrm9Y6wdXPxrJbLYZNe3bIqdrOfArAx/Zy1NR9TMNgIIQlt36ikz9ancOStkEG6+YtCx4aCvmkzEUdjcUvOsLow5k6iq326AluwDweG6FE9bGw/OxqgkX5QNF0Cr41xkEhH4EXyVKT4sJNjWq2M5xydhzcx7H7cRYpu++qNcugEnLNRmR08eHfiVd/7On0JyKRwQsBXRTCNdspGdCsA8FUJkKek0cO182nsaETIkAHN1FAt4q8ueUmrgRUXsIkhvHcg4DTooAyM/u3gTr8ikVvJ4cUmpQogNU9DLiF4HJQrECjuivafVsLer7vI49BbS0x5uBqE5ZanlExPGKekUudcHyD+RFq8JPqF5gdQZRoRzTA/LIuok7jEjXVx84fSdMaAEvs/hNxVNP2AyBzWUL1E/oSpBZyUUfhFw==; Path=/; Secure
      - Expires: Thu, 01 Dec 1994 16:00:00 GMT
      - Cache-Control: no-cache="set-cookie, set-cookie2"
>> Response Headers:
      - Location: https://myJTSserver:9443/jts/oauth-authorize?oauth_token=f26c3b80e00d4a249ec1f68d06e2fd84
      - Content-Language: en-US
      - Content-Length: 0
      - Set-Cookie: JSESSIONID=0000KapyiWGt7odeax2P2RvFRqz:-1; Path=/
      - Set-Cookie: X-com-ibm-team-foundation-auth-loop-avoidance=false
      - Date: Wed, 08 May 2013 11:46:35 GMT
      - Server: WebSphere Application Server/7.0
      - Expires: Thu, 01 Dec 1994 16:00:00 GMT
      - Cache-Control: no-cache="set-cookie, set-cookie2"
>> POST https://myJTSserver:9443/jts/j_security_check
      - Location: https://myJTSserver:9443/jts/auth/authfailed
      - Content-Language: en-US
      - Content-Length: 0
      - Date: Wed, 08 May 2013 11:46:35 GMT
      - Server: WebSphere Application Server/7.0
08-05-2013 13:46:36 org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: jfs-request-token-0c23433bcfa84cf895d01b1b3768de55="jDwHSKmS5dGR9tECxb1mcMsvdLKM9xw0y7VZN1JC6c"; Version=1; Max-Age=600; Expires=Wed, 08-May-2013 11:56:36 GMT; Path=/rm". Unable to parse expires attribute: Wed
08-05-2013 13:46:36 org.apache.http.impl.client.DefaultRequestDirector handleResponse
WARNING: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm=https://myJTSserver:9443/jts/oauth-authorize}


permanent link
helene højrup (231912) | answered May 10 '13, 8:08 a.m.
And the output from the real server


>> GET(1) https://myRealRMserver:9443/rm/rootservices
>> Response Headers:
    - X-RRS-servername: "0"
    - OSLC-Core-Version: 2.0
    - Content-Type: application/rdf+xml
    - Expires: Wed, 08 May 2013 09:17:57 CEST
    - Cache-Control: public
    - Content-Language: en-US
    - Transfer-Encoding: chunked
    - Date: Wed, 08 May 2013 07:12:57 GMT
    - Server: WebSphere Application Server/7.0
>> GET(1) https://myRealRMserver:9443/rm/discovery/RMCatalog
>> Response Headers:
    - Set-Cookie: jfs-oauth-access-token0=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Path=/rm
    - Set-Cookie: jfs-oauth-access_token-secret0=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Path=/rm
    - Set-Cookie: jfs-request-token-34bace0d75d14b36ac776a0ef46416c9="SIJ+P8vbvlU/Bb5Ki9ltVXCipVqmn2EaQowmXPWYw2E="; Version=1; Max-Age=864000; Expires=Sat, 18-May-2013 07:12:57 GMT; Path=/rm
    - X-jazz-web-oauth-url: https://myRealJTSserver:9443/jts/oauth-authorize?oauth_token=34bace0d75d14b36ac776a0ef46416c908-05-2013 09:12:57 org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: jfs-request-token-34bace0d75d14b36ac776a0ef46416c9="SIJ+P8vbvlU/Bb5Ki9ltVXCipVqmn2EaQowmXPWYw2E="; Version=1; Max-Age=864000; Expires=Sat, 18-May-2013 07:12:57 GMT; Path=/rm". Unable to parse expires attribute: Sat
08-05-2013 09:12:57 org.apache.http.impl.client.DefaultRequestDirector handleResponse
WARNING: Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth realm=https://myRealJTSserver:9443/jts/oauth-authorize}
    - WWW-Authenticate: OAuth realm=https://myRealJTSserver:9443/jts/oauth-authorize
    - Content-Type: text/html
    - Content-Length: 352
    - Content-Language: en-US
    - Date: Wed, 08 May 2013 07:12:57 GMT
    - Server: WebSphere Application Server/7.0
    - Expires: Thu, 01 Dec 1994 16:00:00 GMT
    - Cache-Control: no-cache="set-cookie, set-cookie2"
>> Response Headers:
    - X-com-ibm-team-repository-web-auth-msg: authrequired
    - Location: https://myRealJTSserver:9443/jts/authenticated/identity?redirectPath=%2Fjts%2Foauth-authorize%3Foauth_token%3D34bace0d75d14b36ac776a0ef46416c9
    - Content-Language: en-US
    - Content-Length: 0
    - Date: Wed, 08 May 2013 07:12:56 GMT
    - Server: WebSphere Application Server/7.0
>> Response Headers:
    - Location: https://myRealJTSserver:9443/jts/auth/authrequired
    - Content-Language: en-US
    - Content-Length: 0
    - Set-Cookie: WASReqURL=https://:9443/jts/authenticated/identity?redirectPath=%252Fjts%252Foauth-authorize%253Foauth_token%253D34bace0d75d14b36ac776a0ef46416c9; Path=/
    - Date: Wed, 08 May 2013 07:12:56 GMT
    - Server: WebSphere Application Server/7.0
    - Expires: Thu, 01 Dec 1994 16:00:00 GMT
    - Cache-Control: no-cache="set-cookie, set-cookie2"
>> POST https://myRealJTSserver:9443/jts/j_security_check
    - Date: Wed, 08 May 2013 07:12:56 GMT
    - Server: WebSphere Application Server/7.0
    - Location: https://myRealJTSserver:9443/jts/authenticated/identity?redirectPath=%2Fjts%2Foauth-authorize%3Foauth_token%3D34bace0d75d14b36ac776a0ef46416c9
    - Content-Language: en-US
    - Content-Length: 0
    - Set-Cookie: WASReqURL=""; Expires=Thu, 01-Dec-94 16:00:00 GMT; Path=/
    - Set-Cookie: LtpaToken2=JLlq+dI0UuaDGweftDDJs665r8DRZE5q1PvYoF/5S54Bdhtf9UE9PC5QljVry6gaa7DEGjdXmPQz1P5taUI4iYeH7ZgBDvyeEDhycDqYAodR85RmivgX8WDoc+z/y1OTn5hG1v8KcSxvpNbC0ckee4e7XOQP0nZVB2UqhIgR1WCbSrVmabKeJDeIJCjxHDyHj3WaKSWMvIYaZAu0uaudkM79s3EOMP39pznmDgP1UwXvub5CRbgrKTXl06PQ17IwmaKBeqkSpxE39QYKKIt7+4UDodQdmlOly6H55QWoZAfHgfTOtN/ANdfSvU0UphXGBxyK/AL+elDPhaBgDbfuVB0Ba9AEKUyQwgMO/dL0QSxyHKQcnAtsPSAdrCZ+GoajEQoQoZhtH+JTUWvRWvVqWRpkac2SBgVUeLua0WUnK5oTL8TsmCUwmDJFvzylH9DCN9w940ewr6cD5adzhcqPYTvOCL4aNPZyn+KU3d5uyUBnC8oRIX9fxXFVKbD2igsgAFLrao9oyp3b0rQ/PwmGN2CaTccYaAg3+eS6K2V8UHo1LTKJm9ucji1+oz0+GfHyyQYfk6wFqZrxM+wV3AboKI5ImHv6kgf5fE/8GZGkO8P6ClpIiF9GNnK+UqXWfRik+LDpG+r1xeY0ogrIiUMJFgYoBgPCl6F3CnE+vbmzpgAWWSpTWk0suBEZPfHQ34VtZgiBCQqpTVQ47j5mIjbl8gjvs+QL1/P3KkPD4AuRlA9+Pb16cZROTB+9ptUukT2ACWy/cNqBPTTmd8rAoCJkkA==; Path=/; Domain=.danfoss.net; Secure
    - Expires: Thu, 01 Dec 1994 16:00:00 GMT
    - Cache-Control: no-cache="set-cookie, set-cookie2"
>> Response Headers:
    - Location: https://myRealJTSserver:9443/jts/oauth-authorize?oauth_token=34bace0d75d14b36ac776a0ef46416c9
    - Content-Language: en-US
    - Content-Length: 0
    - Set-Cookie: JSESSIONID=0000ERUelM2qW--6_H0L-0GjZIJ:-1; Path=/
    - Set-Cookie: X-com-ibm-team-foundation-auth-loop-avoidance=false
    - Date: Wed, 08 May 2013 07:12:56 GMT
    - Server: WebSphere Application Server/7.0
    - Expires: Thu, 01 Dec 1994 16:00:00 GMT
    - Cache-Control: no-cache="set-cookie, set-cookie2"
>> POST https://myRealJTSserver:9443/jts/j_security_check
    - Location: https://myRealJTSserver:9443/jts/auth/authfailed
    - Content-Language: en-US
    - Content-Length: 0
    - Date: Wed, 08 May 2013 07:12:56 GMT
    - Server: WebSphere Application Server/7.0
>> Project Areas:
>>      - Standard Products(RM)
>>      ...


Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.