Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid token expiry parsing #7

Closed
schambon opened this issue Aug 12, 2014 · 0 comments
Closed

Invalid token expiry parsing #7

schambon opened this issue Aug 12, 2014 · 0 comments
Labels

Comments

@schambon
Copy link

Found by chance, needs investigation: the TokenRefreshInterceptor doesn't kick in when it should (see portal logs extracts: last request yesterday at 18:14, first request this morning at 09:20, no token refresh and therefore 401s all around).

A cursory debug session in the interceptor shows than a newly-minted access token has an expiry time sometime in the 47th millennium AD, so the issue appears to be with token expiry time parsing / storing in Oasis-Spring-Integration, so we need to look into that.

Portal log extract:

| DEBUG| 18:14:02.623 | org.oasis_eu.spring.util.KernelLoggingInterceptor - Response headers: 
Date:   [Mon, 11 Aug 2014 16:14:02 GMT]
Content-Type:   [application/json]
Content-Length: [4219]
Via:    [1.1 oasis-demo.atolcd.com]
Strict-Transport-Security:  [max-age=2592000]
Keep-Alive: [timeout=2, max=244]
Connection: [Keep-Alive]

| INFO | 18:14:02.627 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property local_id
| INFO | 18:14:02.627 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property instance_id
| INFO | 18:14:02.627 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property service_uri
| INFO | 18:14:02.628 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property local_id
| INFO | 18:14:02.628 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property instance_id
| INFO | 18:14:02.628 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property service_uri
| INFO | 18:14:02.628 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property local_id
| INFO | 18:14:02.628 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property instance_id
| INFO | 18:14:02.628 | org.oasis_eu.portal.core.model.catalog.CatalogEntry - Discarding unknown property service_uri
| DEBUG| 09:20:17.763 | org.oasis_eu.spring.util.KernelLoggingInterceptor - Intercepted GET request to: https://oasis-demo.atolcd.com/d/memberships/user/a399684b-4ea3-49c3-800b-b8a0bf1131cb?start=0&limit=20
| DEBUG| 09:20:17.763 | org.oasis_eu.spring.util.KernelLoggingInterceptor - Request headers: 
Accept: [application/json, application/*+json]
Authorization:  [Bearer eyJpZCI6IjNiNTU1ODcwLTM5MTgtNDU4Yi05MDYwLTgwZjQ5NjYyNGZhZC81Y0RQMEthRG5zOGo5MWw4cnNIY0VnIiwiaWF0IjoxNDA3NzczNDI5NjQ2LCJleHAiOjE0MDc3NzcwMjk2NDZ9]
Content-Length: [0]

| DEBUG| 09:20:17.763 | org.oasis_eu.spring.util.KernelLoggingInterceptor - Request body: 
| DEBUG| 09:20:17.984 | org.oasis_eu.spring.util.KernelLoggingInterceptor - Response: 401 Unauthorized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant