socialcast / devise_oauth2_providable

Rails3 engine integrating OAuth2 authentication with Devise
MIT License
219 stars 102 forks source link

TokensController can be subclassed #42

Closed duncanbeevers closed 12 years ago

duncanbeevers commented 12 years ago

The Oauth2GrantType strategy currently relies on the hard-coded path to the TokensController. Subclassing this controller in order to tune some of its filter behaviors, and then mounting it manually within an app doesn't work due to this constant.

This change modifies the strategy to check the type of the ActionController instance passed through the Rack environment thereby preserving the original behavior while also allowing subclassing.

wireframe commented 12 years ago

thanks for the patch!