Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

authorization code flow: support token cache #138

Merged
merged 3 commits into from
Apr 25, 2018

Conversation

yugangw-msft
Copy link
Contributor

No description provided.

@yugangw-msft
Copy link
Contributor Author

//cc: @rayluo


# the caching layer adds a few extra fields, let us pop them out for easier verification
for k in ['_clientId', '_authority', 'resource']:
token_response.pop(k)
Copy link
Collaborator

@rayluo rayluo Apr 24, 2018

Choose a reason for hiding this comment

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

@yugangw-msft
Thanks for identifying this little quirk and working it out!
Nitpicking: I would suggest to use a slightly safer way to rewrite this line to token_response.pop(k, None) because:

  1. conceptually those tricky side effects are just implementation details, which could potentially be changed in future;
  2. at the very least, this test case should not rely on an assumption that those side effects would always exist.

I will send out a new commit for it, if you don't mind. Oh, I forgot that I probably do not have permission to send commits to your fork repo. So perhaps the easier way is you make that change in your PR, again, if you don't mind. :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants