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
moduleConstraint
2
classAuthenticated
3
4
defmatches?(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.