doorkeeper-gem / doorkeeper-openid_connect

OpenID Connect extension for Doorkeeper
MIT License
175 stars 117 forks source link

`/.well-known/openid-configuration` crashes when `Doorkeeper.config.allow_token_introspection` is false #166

Closed sato11 closed 2 years ago

sato11 commented 2 years ago

Dookeeper allows to disable token introspection by setting allow_token_introspection to false. With this configured, the route is not drawn and naturally oauth_introspect_url helper is not available.

https://github.com/doorkeeper-gem/doorkeeper/blob/v5.6.0.rc1/lib/doorkeeper/rails/routes.rb#L39

However, on the doorkeeper-openid_connect side, the above behavior is overlooked and oauth_introspect_url is always depended on, which causes NoMethodError whenever we configure as such and make request to /.well-known/openid-configuration.

This is reproducible if you just write allow_token_introspection false in spec/dummy/config/initializers/doorkeeper.rb and run tests.

sato11 commented 2 years ago

I have a draft patch and it'll soon be ready, but for the formality created an issue as well.