Skip to content

v1.6.0

Compare
Choose a tag to compare
@stakach stakach released this 30 Aug 00:45
· 6 commits to master since this release

adds optional dynamic key selection

# You may dynamically decide the key by passing a block to the decode function
# the algorithm is optional, you can omit it to use algorithm defined in the header
payload, header = JWT.decode(token, JWT::Algorithm::HS256) do |header, payload|
  "the key"
end