Skip to content

incubus/oa-mailru

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

oa-mailru

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

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

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

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

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

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

config.omniauth :mail_ru, <ID приложения>, <Секретный ключ приложения>, :private_key => <Приватный ключ приложения>

Ссылки

OmniAuth: github.com/intridea/omniauth

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

Авторизация Mail.Ru для сайтов: api.mail.ru/docs/guides/oauth/sites/

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.

Releases

No releases published

Packages

No packages published

Languages