```ruby
module Toke
  class ApplicationController < ActionController::Base
    protect_from_forgery with: :null_session

    include Toke::TokenAuthentication
  end
end
```

Use ActionController::API instead of ::Base
user
```ruby
module Toke
  class ApplicationController < ActionController::API
    include ActionController::HttpAuthentication::Basic::ControllerMethods
    include Toke::TokenAuthentication
  end
end
```
assistant