Skip to content

JWK Set

nov edited this page Sep 10, 2015 · 8 revisions

JSON Web Key Set (JWKs)

Encoding

JSON::JWK::Set can be initiated by putting an array of JSON::JWK instances, or Hash represented JSON Web Key Set.

JSON::JWK::Set.new(jwk1, jwk2, jwk3, ...)
JSON::JWK::Set.new([jwk1, jwk2, jwk3, ...])
JSON::JWK::Set.new(
  keys: [{
    kty: :RSA,
    e: 'AQAB',
    n: 'AK8ppaAGn6N3jDic2...'
  }, {
    :
  }]
)

Decoding

Just call JSON::JWK::Set#to_json.

Clone this wiki locally