Sha256: 1a8cdf0d756af62219bf73ce0ecf7aa7678f8f31b79f9d3003456ac81386da90

Contents?: true

Size: 324 Bytes

Versions: 6

Compression:

Stored size: 324 Bytes

Contents

module JSON
  class JWK::Set < Array
    def initialize(*jwks)
      replace Array(jwks).flatten
    end

    def content_type
      'application/jwk-set+json'
    end

    def as_json(options = {})
      # NOTE: Array.new wrapper is requied to avoid CircularReferenceError
      {:keys => Array.new(self)}
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
json-jwt-0.7.0.alpha2 lib/json/jwk/set.rb
json-jwt-0.7.0.alpha lib/json/jwk/set.rb
json-jwt-0.6.1 lib/json/jwk/set.rb
json-jwt-0.6.0 lib/json/jwk/set.rb
json-jwt-0.5.6 lib/json/jwk/set.rb
json-jwt-0.5.5 lib/json/jwk/set.rb