18F/myusa — pull request #144 by cpapazian (2014-08-12 21:42:07+00:00)
Title: Create helper for OAuth deny link

Hey @mikefab and @RyanRusnak ... this PR has the OAuth deny link that I promised. Just call the helper with a pre_auth object and some link text and it should all work. Let me know if you guys have any issues.

Helper creates a link that will send user back to calling app with access_denied. There is a little bit of hackery to support non-redirectable redirect_uri's ... that's to support the native_uri concept that Doorkeeper uses for testing. Specifically, that style of redirect link will send user to our deny route, which will render JSON. The main downside here is that it uses some Rails trickery to create a link that uses HTTP DELETE.