This commit is contained in:
Benjamin Neff 2018-11-10 21:06:15 +01:00
parent 2210cf0038
commit 6fb1e1f524
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 3 additions and 7 deletions

View file

@ -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)

View file

@ -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}