nov / json-jwt

JSON Web Token and its family (JSON Web Signature, JSON Web Encryption and JSON Web Key) in Ruby
MIT License
299 stars 80 forks source link

`JSON::JWK::Set#[]` was overwritten in v1.15.1 #117

Closed kkitadate closed 7 months ago

kkitadate commented 7 months ago

There seems to be an unintentional incompatibility in v1.15.1. I think you may not be aware of this incompatibility, so I'm filing this issue. (It's not that I'm particularly troubled, as it can be avoided by simply changing it on the user side. For example, rewriting it to Array#first.)

Until v1.15.0, JSON::JWK::Set#[] was equivalent to Array#[]. Due to changes in v1.15.1, JSON::JWK::Set#[] has been newly implemented. (ref. https://github.com/nov/json-jwt/commit/5de3549f1084d23393f8026df8950f89a90f6e69#diff-13fcf75872fbf16b257d0631773570b4089ddf6865340f6e399400ba9eca735a)

As a result, I think the behavior from v1.15.0 and earlier has been overwritten.

nov commented 7 months ago

Sorry, I didn't expect people access jwks[0], jwks[1] etc.