Sha256: 5cebd6cd0415059dd00b8042af558e657125ca19ef3e4e6b4e25e04d5a3efeb2
Contents?: true
Size: 349 Bytes
Versions: 37
Compression:
Stored size: 349 Bytes
Contents
module OpenIDConnect module JWTnizable def to_jwt(key, algorithm = :RS256, &block) as_jwt(key, algorithm, &block).to_s end def as_jwt(key, algorithm = :RS256, &block) token = JSON::JWT.new as_json yield token if block_given? token = token.sign key, algorithm if algorithm != :none token end end end
Version data entries
37 entries across 37 versions & 1 rubygems