doorkeeper
Search…
Route Constraints and other integrations
You can leverage the Doorkeeper.authenticate facade to easily extract a Doorkeeper::OAuth::Token based on the current request. You can then ensure that token is still good, find its associated #resource_owner_id, etc.
1
module Constraint
2
class Authenticated
3
4
def matches?(request)
5
token = Doorkeeper.authenticate(request)
6
token&.accessible?
7
end
8
end
9
end
Copied!
For more information about integration and other integrations, check out the related wiki page.
Copy link