mirror of
https://github.com/OMGeeky/yup-oauth2.git
synced 2025-12-26 16:27:25 +01:00
Along with the public facing change the implementation has been modified to no longer clone the scopes instead using the pointer to the scopes the user provided. This greatly reduces the number of allocations on each token() call. Note that this also changes the hashing method used for token storage in an incompatible way with the previous implementation. The previous implementation pre-sorted the vector and hashed the contents to make the result independent of the ordering of the scopes. Instead we now combine the hash values of each scope together with XOR, thus producing a hash value that does not depend on order without needing to allocate another vector and sort.