class JWT::JWK::Thumbprint

tools.ietf.org/html/rfc7638

Attributes

jwk[R]

Public Class Methods

new(jwk) click to toggle source
# File lib/jwt/jwk/thumbprint.rb, line 9
def initialize(jwk)
  @jwk = jwk
end

Public Instance Methods

generate() click to toggle source
# File lib/jwt/jwk/thumbprint.rb, line 13
def generate
  ::Base64.urlsafe_encode64(
    Digest::SHA256.digest(
      JWT::JSON.generate(
        jwk.members.sort.to_h
      )
    ), padding: false
  )
end
Also aliased as: to_s
to_s()
Alias for: generate