Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/traitify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ def log(level, message)
end

def valid_jwt_token?(token)
algorithm = "RS256"
algorithm = "ES256"
return false unless jwt_public_keys && jwt_public_keys.any?

public_keys = jwt_public_keys.map { |key| OpenSSL::PKey::RSA.new(key) }
public_keys = jwt_public_keys.map { |key| OpenSSL::PKey::EC.new(key) }

public_keys.each do |public_key|
decoded_token = JWT.decode(token, public_key, true, {
Expand Down
2 changes: 1 addition & 1 deletion lib/traitify/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Traitify
VERSION = "2.1.1".freeze
VERSION = "2.1.3".freeze
end
Loading