From 6fb1e1f52489b4751ca22e596f049d383afa2002 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 10 Nov 2018 21:06:15 +0100 Subject: [PATCH] Bump jwt --- Gemfile.lock | 2 +- .../api/openid_connect/authorizations_controller_spec.rb | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 321ee9c6f..f63bd8bfc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -350,7 +350,7 @@ GEM jsonpath (0.9.6) multi_json to_regexp (~> 0.2.1) - jwt (1.5.6) + jwt (2.1.0) kgio (2.11.2) kostya-sigar (2.0.4) leaflet-rails (1.3.1) diff --git a/spec/controllers/api/openid_connect/authorizations_controller_spec.rb b/spec/controllers/api/openid_connect/authorizations_controller_spec.rb index 7ce14838a..ad6606d86 100644 --- a/spec/controllers/api/openid_connect/authorizations_controller_spec.rb +++ b/spec/controllers/api/openid_connect/authorizations_controller_spec.rb @@ -31,12 +31,10 @@ describe Api::OpenidConnect::AuthorizationsController, type: :request do context "as a request object" do it "should return a form page" do - header = JWT.encoded_header("none") payload_hash = {client_id: client.client_id, redirect_uri: "http://localhost:3000/", response_type: "id_token", scope: "openid", nonce: "hello", state: "hello", claims: {userinfo: {name: {essential: true}}}} - payload = JWT.encoded_payload(JSON.parse(payload_hash.to_json)) - request_object = header + "." + payload + "." + request_object = JWT.encode(payload_hash, nil, "none") get new_api_openid_connect_authorization_path, params: {client_id: client.client_id, redirect_uri: "http://localhost:3000/", response_type: "id_token", scope: "openid", nonce: "hello", state: "hello", request: request_object} @@ -46,11 +44,9 @@ describe Api::OpenidConnect::AuthorizationsController, type: :request do context "as a request object with no claims" do it "should return a form page" do - header = JWT.encoded_header("none") payload_hash = {client_id: client.client_id, redirect_uri: "http://localhost:3000/", response_type: "id_token", scope: "openid", nonce: "hello", state: "hello"} - payload = JWT.encoded_payload(JSON.parse(payload_hash.to_json)) - request_object = header + "." + payload + "." + request_object = JWT.encode(payload_hash, nil, "none") get new_api_openid_connect_authorization_path, params: {client_id: client.client_id, redirect_uri: "http://localhost:3000/", response_type: "id_token", scope: "openid", nonce: "hello", state: "hello", request: request_object}