Skip to content

Conversation

guyp-descope
Copy link
Contributor

No description provided.

@guyp-descope guyp-descope requested a review from aviadl August 7, 2022 18:11
@github-actions
Copy link

github-actions bot commented Aug 7, 2022

Coverage

Coverage Report
FileStmtsMissCoverMissing
descope
   auth.py210498%55, 376, 406–407
TOTAL724499% 

Tests Skipped Failures Errors Time
63 0 💤 0 ❌ 0 🔥 1.110s ⏱️

@guyp-descope
Copy link
Contributor Author

guyp-descope commented Aug 7, 2022

This is an example of the new jwt_response object:

{
  "sessionToken": {
    "drn": "DS",
    "exp": 1659896020,
    "iat": 1659895420,
    "iss": "P2CqIuEFqHuwq3iz1L1sTt9yTTw3",
    "sub": "U2CqIuwnRO5VWzpM73aJ94dgtuQy",
    "jwt": "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3FJdUVGcUh1d3EzaXoxTDFzVHQ5eVRUdzMiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEUyIsImV4cCI6MTY1OTg5NjAyMCwiaWF0IjoxNjU5ODk1NDIwLCJpc3MiOiJQMkNxSXVFRnFIdXdxM2l6MUwxc1R0OXlUVHczIiwic3ViIjoiVTJDcUl1d25STzVWV3pwTTczYUo5NGRndHVReSJ9.Tpa3rK-70b5oOXbs4lWVNc3qU2xgQaP7GwceCgC_egsCHcVTaBp76g6wbwBEWC0a3LJaTU3-hg_edzs6ced2mbZqCADVFNhoFOA2vBoeU8DJthDhBdW5G10lwbMqxL8t"
  },
  "refreshSessionToken": {
    "drn": "DSR",
    "exp": 1662314620,
    "iat": 1659895420,
    "iss": "P2CqIuEFqHuwq3iz1L1sTt9yTTw3",
    "sub": "U2CqIuwnRO5VWzpM73aJ94dgtuQy",
    "jwt": "eyJhbGciOiJFUzM4NCIsImtpZCI6IlAyQ3FJdUVGcUh1d3EzaXoxTDFzVHQ5eVRUdzMiLCJ0eXAiOiJKV1QifQ.eyJkcm4iOiJEU1IiLCJleHAiOjE2NjIzMTQ2MjAsImlhdCI6MTY1OTg5NTQyMCwiaXNzIjoiUDJDcUl1RUZxSHV3cTNpejFMMXNUdDl5VFR3MyIsInN1YiI6IlUyQ3FJdXduUk81Vld6cE03M2FKOTRkZ3R1UXkifQ.PbP3TpXNc0XO0RJNZnnumczYbjP2mqrIIdhxXqwkj9HOW7Pe7cqwZTv8qjAtp6-FeJkYtOlDnwaLi5NzyG5JIHwojc07LkQg2ZajnYV87Ei2_lqpR1HffK6odPGoH7vK"
  },
  "cookieData": {
    "exp": 1662487420,
    "maxAge": 2591999,
    "domain": "",
    "path": "/"
  },
  "tenants": {},
  "projectId": "P2CqIuEFqHuwq3iz1L1sTt9yTTw3",
  "userId": "U2CqIuwnRO5VWzpM73aJ94dgtuQy",
  "user": {
    "externalIds": [
      "guyp@descope.com"
    ],
    "name": "Descope Admin",
    "email": "guyp@descope.com",
    "phone": "",
    "verifiedEmail": true,
    "verifiedPhone": true
  },
  "firstSeen": false,
  "error": ""
}

@meirwah FYI (it should not have any effect on the integration tests)

@guyp-descope guyp-descope requested a review from asafshen August 7, 2022 18:19
Copy link
Member

@asafshen asafshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!

  • regarding cookieData, did we consider just putting the field as top level fields with same name as the response from server? (similar to go-sdk)

  • lets also make sure we handle logout properly (see Aviads PR descope/go-sdk#113)

@guyp-descope
Copy link
Contributor Author

I think our logout logic is good now (we changed it with Aviad after he changed the go sdk), Am I wrong here? did you found something that is not good/aligned?

@guyp-descope guyp-descope requested a review from asafshen August 8, 2022 08:40
Copy link
Member

@asafshen asafshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:+1

@guyp-descope guyp-descope merged commit 4607b02 into main Aug 8, 2022
@guyp-descope guyp-descope deleted the adjust-jwt-response-object branch August 8, 2022 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants