2019-12-26 22:10:19 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
# oauth_discovery_keys GET /oauth/discovery/keys(.:format) doorkeeper/openid_connect/discovery#keys
|
2020-04-22 19:07:51 +05:30
|
|
|
# jwks GET /-/jwks(.:format) doorkeeper/openid_connect/discovery#keys
|
2017-08-17 22:00:37 +05:30
|
|
|
# oauth_discovery_provider GET /.well-known/openid-configuration(.:format) doorkeeper/openid_connect/discovery#provider
|
|
|
|
# oauth_discovery_webfinger GET /.well-known/webfinger(.:format) doorkeeper/openid_connect/discovery#webfinger
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe Doorkeeper::OpenidConnect::DiscoveryController, 'routing' do
|
2017-08-17 22:00:37 +05:30
|
|
|
it "to #provider" do
|
|
|
|
expect(get('/.well-known/openid-configuration')).to route_to('doorkeeper/openid_connect/discovery#provider')
|
|
|
|
end
|
|
|
|
|
|
|
|
it "to #webfinger" do
|
|
|
|
expect(get('/.well-known/webfinger')).to route_to('doorkeeper/openid_connect/discovery#webfinger')
|
|
|
|
end
|
|
|
|
|
|
|
|
it "to #keys" do
|
|
|
|
expect(get('/oauth/discovery/keys')).to route_to('doorkeeper/openid_connect/discovery#keys')
|
|
|
|
end
|
2020-04-22 19:07:51 +05:30
|
|
|
|
|
|
|
it "/-/jwks" do
|
|
|
|
expect(get('/-/jwks')).to route_to('doorkeeper/openid_connect/discovery#keys')
|
|
|
|
end
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
|
|
|
|
# oauth_userinfo GET /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show
|
|
|
|
# POST /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe Doorkeeper::OpenidConnect::UserinfoController, 'routing' do
|
2017-08-17 22:00:37 +05:30
|
|
|
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
|