Skip to content

Supported Frameworks

Gonzalo Bulnes Guilpain edited this page Feb 4, 2016 · 3 revisions

Support exists for Rails applications, Rails API and Rails Metal applications. Experimental support exists for Grape applications.

Rails

Available since: v1.0.0

Any controller which inherits from ActionController::Base can act as a token authentication handler:

SomeController < ActionController::Base
  acts_as_token_authentication_handler_for User
end

Rails::API

Available since: v1.7.0

Any controller which inherits from ActionController::API can act as a token authentication handler:

SomeController < ActionController::API
  acts_as_token_authentication_handler_for User
end

Rails Metal

Available since: v1.12.0

Any controller which inherits from ActionController::Metal can act as a token authentication handler:

SomeController < ActionController::Metal
  acts_as_token_authentication_handler_for User
end

See it in action in this example application!

Grape

Experimental: see #138 for details

It allows any controller which inherits from Grape::API to act as a token authentication handler:

SomeController < Grape::API
  acts_as_token_authentication_handler_for User
end