AuthlogicRuby 认证解决方案

联合创作 · 2023-09-30 09:17

Authlogic 是一个简单的 Ruby 认证解决方案,支持 Rails 3 和 4,对 Rails 2 的支持请看 rail2 分支。

示例代码:

class UserSession < Authlogic::Session::Base
  # specify configuration here, such as:
  # logout_on_timeout true
  # ...many more options in the documentation
end

class User < ActiveRecord::Base
  acts_as_authentic do |c|
    c.my_config_option = my_value
  end # the configuration block is optional
end
浏览 11
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑
举报