Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Token Cache not updates correctly #197

Closed
jdneo opened this issue Apr 13, 2018 · 4 comments
Closed

Token Cache not updates correctly #197

jdneo opened this issue Apr 13, 2018 · 4 comments

Comments

@jdneo
Copy link

jdneo commented Apr 13, 2018

The code here:

if (_.isEqual(element, addElement)) {
is using isEqual to check if two token entries are equal or not. But sometimes, addElement is just an update of element, (All the fields are equal except the expiresOn)

For example:
image

image

Then, after add method, the token cache will have two tokens which are duplicated.

After that, when we trigger find for the token cache, it will cause More than one token matches the criteria. The result is ambiguous error.

Here:

callback(self._log.createError('More than one token matches the criteria. The result is ambiguous.'));

@prowe
Copy link

prowe commented Apr 13, 2018

Could this be resolved by #188 ?

@jdneo
Copy link
Author

jdneo commented Apr 13, 2018

Looks good. Thanks

@navyasric
Copy link
Contributor

Closing as this seems to be resolved.

@jdneo
Copy link
Author

jdneo commented Apr 27, 2018

@navyasric

May I ask why you close this issue? The code there hasn't got any updates. The PR referenced by @prowe is still open.

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

No branches or pull requests

3 participants