.generate(options = {})
and returns a string to be used as the token.Doorkeeper::ApplicationController
inherits from ActionController::Base
. You may want to use your own controller to inherit from, to keep Doorkeeper controllers in the same context than the rest your app:Doorkeeper::ApplicationMetalController
that is ActionController::API
by default.handle_auth_errors
to :raise
. In this case Doorkeeper will raise Doorkeeper::Errors::TokenForbidden
, Doorkeeper::Errors::TokenExpired
, Doorkeeper::Errors::TokenRevoked
or other exceptions that you need to care about.