# File lib/openid_connect/jwtnizable.rb, line 7
    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