Odnoklassniki.ru OAuth 2.0 strategy
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Версия, совместимая с OmniAuth 1.0, находится здесь: github.com/incubus/omniauth-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 => <Публичный ключ приложения>

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 © 2011 Alexander Logvinov. See LICENSE for details.