Pull request Compare This branch is 1 commit behind incubus:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
LICENSE
README.rdoc
init.rb

README.rdoc

oa-odnoklassniki

Расширение для OmniAuth, реализующее авторизацию от Odnoklassniki.ru по протоколу OAuth 2.0

Установка и использование

rails plugin install git://github.com/incubus/oa-odnoklassniki.git

Добавить в config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider ::odnoklassniki, <ID приложения>, <Секретный ключ приложения>, :public_key => <Публичный ключ приложения>
end

Devise с версии 1.2.rc интегрирован с OmniAuth. Подключить к нему oa-odnoklassniki достаточно просто, дописав в config/initializers/devise.rb:

config.omniauth :odnoklassniki, <ID приложения>, <Секретный ключ приложения>, :public_key => <Публичный ключ приложения>

Ссылки

OmniAuth: github.com/intridea/omniauth

Интеграция OmniAuth и Devise: railscasts.com/episodes/235-omniauth-part-1 и railscasts.com/episodes/236-omniauth-part-2

Авторизация Odnoklassniki.ru для сайтов: dev.odnoklassniki.ru/wiki/display/ok/The+OAuth+2.0+Protocol

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don't break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright © 2011 Alexander Logvinov. See LICENSE for details.