Skip to content

crossroads/ffcrm_authlogic_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRM Authlogic API

This project is no longer actively maintained.

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 login_url
    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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •