2 ms·
If you change your algorithm, your old tokens are still usable because you know which algorithm was used to create them.
by ultrafez 12y ago
If you change your algorithm, your old tokens are still usable because you know which algorithm was used to create them.
- marcioaguiar 12y agoIt would not be possible to establish a period to migrate all tokens? This "if you change in a possible feature" is not a good argument when modeling something, in my opinion. That's how AbstractFactoryStrategies are made.
- bronson 12y agoThat sounds like a very niche case, probably not worth solving. That said, the JWT lib could allow you to specify one or more fallback algorithms in case the default one fails to validate. If you're switching off an algorithm, you're probably doing it because it's been broken. And, if it's broken, you won't use it anyway.