CRM Authlogic API

===================

This plugin enables applications to authenticate with Fat Free CRM using the Authlogic single_access_token method. Credit to http://blog.smsohan.com/2010/04/using-authlogic-and-single-access-token.html for reference information whilst building this.

Installation

  • Install this plugin into your Fat Free CRM vendor/plugins folder and run rake db:migrate:plugins. This will create the application_accounts table.
  • For your controller action, you need to remove the require_user authentication layer and add a require_application before_filter.
skip_before_filter :require_user, :only => :my_action
before_filter :require_application, :only => :my_action
  • Pop the following method in your application_controller
def require_application
  @current_application_session ||= ApplicationSession.find
  unless @current_application_session
    redirect_to 
    false
  end
end

Where your_app_token is the token specified in the previous step.

TODO

  • Add require_application function to ApplicationController automagically
  • Improve formatting of App API screen.
  • Add more tests.

Copyright (c) 2011 Global Hand, released under the MIT license