omniauth-rails_csrf_protection:在Rails应用程序的OmniAuth请求端点上提供CSRF保护

时间:2021-05-10 12:41:49
【文件属性】:
文件名称:omniauth-rails_csrf_protection:在Rails应用程序的OmniAuth请求端点上提供CSRF保护
文件大小:11KB
文件格式:ZIP
更新时间:2021-05-10 12:41:49
Ruby OmniAuth-Rails CSRF保护 该gem通过实现直接使用Rails的ActionController::RequestForgeryProtection代码的CSRF令牌验证程序,缓解了 (在将OmniAuth gem与Ruby on Rails应用程序结合使用时在请求阶段进行跨站点请求伪造)。 用法 将此行添加到您的应用程序的Gemfile中: gem "omniauth-rails_csrf_protection" 然后运行bundle install安装此gem。 然后,您需要验证应用程序中所有将启动OAuth请求阶段的链接都已转换为包含authenticity_token值的HTTP POST形式。 只需将所有link_to更改为button_to ,或使用link_to ..., method: :post 。 引擎盖下 这个gem对您的应用程序有一些作用:
【文件预览】:
omniauth-rails_csrf_protection-main
----LICENSE.txt(1KB)
----.circleci()
--------config.yml(4KB)
----lib()
--------omniauth()
----Gemfile(295B)
----Rakefile(195B)
----test()
--------test_helper.rb(2KB)
--------application_test.rb(825B)
----README.md(2KB)
----.rubocop.yml(235B)
----CODE_OF_CONDUCT.md(3KB)
----.gitignore(99B)
----omniauth-rails_csrf_protection.gemspec(1KB)

网友评论