parent
c485aa3294
commit
612455d41f
3 changed files with 28 additions and 24 deletions
4
Gemfile
4
Gemfile
|
|
@ -152,7 +152,7 @@ gem "omniauth", "1.4.2"
|
||||||
gem "omniauth-facebook", "4.0.0"
|
gem "omniauth-facebook", "4.0.0"
|
||||||
gem "omniauth-tumblr", "1.2"
|
gem "omniauth-tumblr", "1.2"
|
||||||
gem "omniauth-twitter", "1.4.0"
|
gem "omniauth-twitter", "1.4.0"
|
||||||
gem "twitter", "5.16.0"
|
gem "twitter", "6.1.0"
|
||||||
gem "omniauth-wordpress", "0.2.2"
|
gem "omniauth-wordpress", "0.2.2"
|
||||||
|
|
||||||
# OpenID Connect
|
# OpenID Connect
|
||||||
|
|
@ -173,7 +173,7 @@ gem "acts-as-taggable-on", "3.5.0"
|
||||||
# URIs and HTTP
|
# URIs and HTTP
|
||||||
|
|
||||||
gem "addressable", "2.5.0", require: "addressable/uri"
|
gem "addressable", "2.5.0", require: "addressable/uri"
|
||||||
gem "faraday", "0.9.2"
|
gem "faraday", "0.11.0" # also update User-Agent in OpenID specs
|
||||||
gem "faraday_middleware", "0.11.0.1"
|
gem "faraday_middleware", "0.11.0.1"
|
||||||
gem "faraday-cookie_jar", "0.0.6"
|
gem "faraday-cookie_jar", "0.0.6"
|
||||||
gem "typhoeus", "1.1.2"
|
gem "typhoeus", "1.1.2"
|
||||||
|
|
|
||||||
27
Gemfile.lock
27
Gemfile.lock
|
|
@ -189,7 +189,7 @@ GEM
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
entypo-rails (3.0.0)
|
entypo-rails (3.0.0)
|
||||||
railties (>= 4.1, < 6)
|
railties (>= 4.1, < 6)
|
||||||
equalizer (0.0.10)
|
equalizer (0.0.11)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
eslintrb (2.1.0)
|
eslintrb (2.1.0)
|
||||||
execjs
|
execjs
|
||||||
|
|
@ -210,7 +210,7 @@ GEM
|
||||||
factory_girl_rails (4.8.0)
|
factory_girl_rails (4.8.0)
|
||||||
factory_girl (~> 4.8.0)
|
factory_girl (~> 4.8.0)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
faraday (0.9.2)
|
faraday (0.11.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
faraday-cookie_jar (0.0.6)
|
faraday-cookie_jar (0.0.6)
|
||||||
faraday (>= 0.7.4)
|
faraday (>= 0.7.4)
|
||||||
|
|
@ -295,7 +295,7 @@ GEM
|
||||||
hashie (3.5.5)
|
hashie (3.5.5)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
hitimes (1.2.4)
|
hitimes (1.2.4)
|
||||||
http (1.0.4)
|
http (2.2.1)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
http-cookie (~> 1.0)
|
http-cookie (~> 1.0)
|
||||||
http-form_data (~> 1.0.1)
|
http-form_data (~> 1.0.1)
|
||||||
|
|
@ -723,17 +723,16 @@ GEM
|
||||||
hitimes
|
hitimes
|
||||||
tins (1.13.2)
|
tins (1.13.2)
|
||||||
turbo_dev_assets (0.0.2)
|
turbo_dev_assets (0.0.2)
|
||||||
twitter (5.16.0)
|
twitter (6.1.0)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.5)
|
||||||
buftok (~> 0.2.0)
|
buftok (~> 0.2.0)
|
||||||
equalizer (= 0.0.10)
|
equalizer (= 0.0.11)
|
||||||
faraday (~> 0.9.0)
|
faraday (~> 0.11.0)
|
||||||
http (~> 1.0)
|
http (~> 2.1)
|
||||||
http_parser.rb (~> 0.6.0)
|
http_parser.rb (~> 0.6.0)
|
||||||
json (~> 1.8)
|
memoizable (~> 0.4.2)
|
||||||
memoizable (~> 0.4.0)
|
naught (~> 1.1)
|
||||||
naught (~> 1.0)
|
simple_oauth (~> 0.3.1)
|
||||||
simple_oauth (~> 0.3.0)
|
|
||||||
twitter-text (1.14.5)
|
twitter-text (1.14.5)
|
||||||
unf (~> 0.1.0)
|
unf (~> 0.1.0)
|
||||||
typhoeus (1.1.2)
|
typhoeus (1.1.2)
|
||||||
|
|
@ -814,7 +813,7 @@ DEPENDENCIES
|
||||||
entypo-rails (= 3.0.0)
|
entypo-rails (= 3.0.0)
|
||||||
eye (= 0.9.1)
|
eye (= 0.9.1)
|
||||||
factory_girl_rails (= 4.8.0)
|
factory_girl_rails (= 4.8.0)
|
||||||
faraday (= 0.9.2)
|
faraday (= 0.11.0)
|
||||||
faraday-cookie_jar (= 0.0.6)
|
faraday-cookie_jar (= 0.0.6)
|
||||||
faraday_middleware (= 0.11.0.1)
|
faraday_middleware (= 0.11.0.1)
|
||||||
fixture_builder (= 0.4.1)
|
fixture_builder (= 0.4.1)
|
||||||
|
|
@ -916,7 +915,7 @@ DEPENDENCIES
|
||||||
test_after_commit (= 1.1.0)
|
test_after_commit (= 1.1.0)
|
||||||
timecop (= 0.8.1)
|
timecop (= 0.8.1)
|
||||||
turbo_dev_assets (= 0.0.2)
|
turbo_dev_assets (= 0.0.2)
|
||||||
twitter (= 5.16.0)
|
twitter (= 6.1.0)
|
||||||
twitter-text (= 1.14.5)
|
twitter-text (= 1.14.5)
|
||||||
typhoeus (= 1.1.2)
|
typhoeus (= 1.1.2)
|
||||||
uglifier (= 3.1.2)
|
uglifier (= 3.1.2)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ describe Api::OpenidConnect::ClientsController, type: :controller, suppress_csrf
|
||||||
.with(headers: {
|
.with(headers: {
|
||||||
"Accept" => "*/*",
|
"Accept" => "*/*",
|
||||||
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||||
"User-Agent" => "Faraday v0.9.2"
|
"User-Agent" => "Faraday v0.11.0"
|
||||||
})
|
})
|
||||||
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
||||||
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
||||||
|
|
@ -26,7 +26,8 @@ describe Api::OpenidConnect::ClientsController, type: :controller, suppress_csrf
|
||||||
.with(headers: {
|
.with(headers: {
|
||||||
"Accept" => "*/*",
|
"Accept" => "*/*",
|
||||||
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||||
"User-Agent" => "Faraday v0.9.2"})
|
"User-Agent" => "Faraday v0.11.0"
|
||||||
|
})
|
||||||
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
||||||
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
||||||
response_types: [], grant_types: [], application_type: "web", contacts: [],
|
response_types: [], grant_types: [], application_type: "web", contacts: [],
|
||||||
|
|
@ -83,14 +84,18 @@ describe Api::OpenidConnect::ClientsController, type: :controller, suppress_csrf
|
||||||
context "when valid parameters with jwks_uri is passed" do
|
context "when valid parameters with jwks_uri is passed" do
|
||||||
it "should return a client id" do
|
it "should return a client id" do
|
||||||
stub_request(:get, "http://example.com/uris")
|
stub_request(:get, "http://example.com/uris")
|
||||||
.with(headers: {"Accept" => "*/*",
|
.with(headers: {
|
||||||
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
"Accept" => "*/*",
|
||||||
"User-Agent" => "Faraday v0.9.2"})
|
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||||
|
"User-Agent" => "Faraday v0.11.0"
|
||||||
|
})
|
||||||
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
||||||
stub_request(:get, "https://kentshikama.com/api/openid_connect/jwks.json")
|
stub_request(:get, "https://kentshikama.com/api/openid_connect/jwks.json")
|
||||||
.with(headers: {"Accept" => "*/*",
|
.with(headers: {
|
||||||
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
"Accept" => "*/*",
|
||||||
"User-Agent" => "Faraday v0.9.2"})
|
"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||||
|
"User-Agent" => "Faraday v0.11.0"
|
||||||
|
})
|
||||||
.to_return(status: 200,
|
.to_return(status: 200,
|
||||||
body: "{\"keys\":[{\"kty\":\"RSA\",\"e\":\"AQAB\",\"n\":\"qpW\",\"use\":\"sig\"}]}", headers: {})
|
body: "{\"keys\":[{\"kty\":\"RSA\",\"e\":\"AQAB\",\"n\":\"qpW\",\"use\":\"sig\"}]}", headers: {})
|
||||||
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue