2019-10-29 02:06:14 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-12-09 12:36:50 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2021-11-15 16:14:31 -05:00
|
|
|
# oauth_discovery_keys GET /oauth/discovery/keys(.:format) jwks#keys
|
|
|
|
# oauth_discovery_provider GET /.well-known/openid-configuration(.:format) jwks#provider
|
|
|
|
# oauth_discovery_webfinger GET /.well-known/webfinger(.:format) jwks#webfinger
|
2020-06-24 02:09:01 -04:00
|
|
|
RSpec.describe Doorkeeper::OpenidConnect::DiscoveryController, 'routing' do
|
2016-12-09 12:36:50 -05:00
|
|
|
it "to #provider" do
|
2021-11-15 16:14:31 -05:00
|
|
|
expect(get('/.well-known/openid-configuration')).to route_to('jwks#provider')
|
2016-12-09 12:36:50 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
it "to #webfinger" do
|
2021-11-15 16:14:31 -05:00
|
|
|
expect(get('/.well-known/webfinger')).to route_to('jwks#webfinger')
|
2016-12-09 12:36:50 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
it "to #keys" do
|
2021-11-15 16:14:31 -05:00
|
|
|
expect(get('/oauth/discovery/keys')).to route_to('jwks#keys')
|
2016-12-09 12:36:50 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# oauth_userinfo GET /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show
|
|
|
|
# POST /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show
|
2020-06-24 02:09:01 -04:00
|
|
|
RSpec.describe Doorkeeper::OpenidConnect::UserinfoController, 'routing' do
|
2016-12-09 12:36:50 -05:00
|
|
|
it "to #show" do
|
|
|
|
expect(get('/oauth/userinfo')).to route_to('doorkeeper/openid_connect/userinfo#show')
|
|
|
|
end
|
|
|
|
|
|
|
|
it "to #show" do
|
|
|
|
expect(post('/oauth/userinfo')).to route_to('doorkeeper/openid_connect/userinfo#show')
|
|
|
|
end
|
|
|
|
end
|