Devise Radius Authenticatable
=============================
[![Gem Version](https://badge.fury.io/rb/devise-radius-authenticatable.png)](http://badge.fury.io/rb/devise-radius-authenticatable)
[![Build Status](https://travis-ci.org/cbascom/devise-radius-authenticatable.png)](https://travis-ci.org/cbascom/devise-radius-authenticatable)
[![Code Climate](https://codeclimate.com/github/cbascom/devise-radius-authenticatable.png)](https://codeclimate.com/github/cbascom/devise-radius-authenticatable)
Devise Radius Authenticatable is a Radius authentication strategy for [Devise](http://github.com/plataformatec/devise).
Dependencies
------------
- Rails ~> 3.2
- Devise ~> 2.0
- radiustar ~> 0.0.8
Installation
------------
In the Gemfile for your application:
gem "devise", "~> 2.0"
gem "devise-radius-authenticatable"
Setup
-----
Run the rails generators for devise (please check the [devise](http://github.com/plataformatec/devise) documents for further instructions)
rails generate devise:install
rails generate devise MODEL_NAME
Run the rails generator for devise-radius-authenticatable. Note that the generator is named with underscores instead of hyphens due to rails restrictions.
rails generate devise_radius_authenticatable:install <IP> <SECRET> [options]
This will update the devise.rb initializer. The IP and SECRET parameters specify the IP address and shared secret for the radius server. There are also some options you can pass to the generator to customize some default settings:
Options:
[--uid-field=UID_FIELD] # What database column to use for the UID
# Default: uid
[--port=PORT] # The port to connect to the radius server on
# Default: 1812
[--timeout=TIMEOUT] # How long to wait for a response from the radius server
# Default: 60
[--retries=RETRIES] # How many times to retry a radius request
# Default: 0
[--dictionary-path=DICTIONARY_PATH] # The path to load radius dictionary files from
[--handle-timeout-as-failure=HANDLE_TIMEOUT_AS_FAILURE] # Option to handle radius timeout as authentication failure
# Default: false
Documentation
-------------
The rdocs for the gem are available here: http://rubydoc.info/github/cbascom/devise-radius-authenticatable/master/frames
Usage
-----
In order to use the radius_authenticatable strategy, you must modify your user model to use the :radius_authenticatable module. The radius_authenticatable strategy can be used standalone or along with database_authenticatable and any other strategies you wish to include. If you use radius_authenticatable alongside other authentication strategies, the default order for the strategies is determined by the order they are loaded in. The last loaded strategy will be the first strategy executed. The order of these strategies can be configured in the devise.rb initializer as follows:
config.warden do |warden_config|
warden_config.default_strategies(:token_authenticatable,
:database_authenticatable,
:radius_authenticatable,
{:scope => :admin})
end
The radius_authenticatable strategy will stop warden from continuing to the next strategy if authentication to the radius server is successful, but will have warden continue to the next stratgey if authentication to the radius server fails.
The field that is used for logins is the first key that's configured in the Devise `config.authentication_keys` settings, which by default is email. For help changing this, please see the [Railscast](http://railscasts.com/episodes/210-customizing-devise) that goes through how to customize Devise.
Configuration
-------------
The radius_authenticatable module is configured through the normal devise initializer `config/initializers/devise.rb`. The initial values are added to the file when you run the devise_radius_authenticatable:install generator as described previously.
References
----------
* [FreeRadius](http://www.freeradius.org/)
* [Devise](http://github.com/plataformatec/devise)
* [Warden](http://github.com/hassox/warden)
Copyright (c) 2012-2013 Calvin Bascom Released under the MIT license
没有合适的资源?快使用搜索试试~ 我知道了~
添加一个radius_authenticatable模块以与设计一起使用.zip
共81个文件
rb:36个
erb:17个
yml:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 59 浏览量
2023-04-06
22:20:00
上传
评论
收藏 75KB ZIP 举报
温馨提示
添加一个radius_authenticatable模块以与设计一起使用
资源推荐
资源详情
资源评论
收起资源包目录
添加一个radius_authenticatable模块以与设计一起使用.zip (81个子文件)
devise-radius-authenticatable-master
lib
devise
radius_authenticatable
test_helpers.rb 4KB
version.rb 84B
models
radius_authenticatable.rb 7KB
radius_authenticatable.rb 1KB
strategies
radius_authenticatable.rb 1KB
devise-radius-authenticatable.rb 169B
generators
devise_radius_authenticatable
install_generator.rb 4KB
Rakefile 500B
.rspec 9B
.travis.yml 106B
devise-radius-authenticatable.gemspec 2KB
spec
devise
models
radius_authenticatable_spec.rb 6KB
rails_app
lib
tasks
.gitkeep 0B
assets
.gitkeep 0B
Rakefile 273B
config.ru 158B
app
assets
stylesheets
application.css 546B
images
rails.png 6KB
javascripts
application.js 641B
mailers
.gitkeep 0B
controllers
admins_controller.rb 2KB
application_controller.rb 205B
helpers
application_helper.rb 29B
models
admin.rb 376B
.gitkeep 0B
views
devise
registrations
new.html.erb 494B
edit.html.erb 961B
mailer
confirmation_instructions.html.erb 232B
unlock_instructions.html.erb 295B
reset_password_instructions.html.erb 424B
passwords
new.html.erb 375B
edit.html.erb 558B
confirmations
new.html.erb 387B
shared
_links.erb 1KB
unlocks
new.html.erb 369B
sessions
new.html.erb 478B
layouts
application.html.erb 442B
admins
_form.html.erb 405B
index.html.erb 406B
new.html.erb 77B
show.html.erb 119B
edit.html.erb 113B
public
422.html 711B
500.html 643B
robots.txt 204B
404.html 728B
favicon.ico 0B
Gemfile 88B
.gitignore 430B
script
rails 295B
config
application.rb 3KB
environment.rb 152B
database.yml 571B
locales
devise.en.yml 4KB
en.yml 214B
routes.rb 2KB
initializers
backtrace_silencers.rb 404B
devise.rb 13KB
mime_types.rb 205B
secret_token.rb 499B
inflections.rb 533B
wrap_parameters.rb 465B
session_store.rb 417B
environments
test.rb 1KB
production.rb 2KB
development.rb 1KB
boot.rb 191B
db
schema.rb 2KB
seeds.rb 343B
migrate
20120627042556_devise_create_admins.rb 2KB
factories
admins.rb 194B
fixtures
devise.rb 11KB
support
devise_helpers.rb 456B
generator_helpers.rb 518B
generators
install_generator_spec.rb 3KB
integration
radius_authenticatable_spec.rb 4KB
spec_helper.rb 855B
Gemfile 38B
.gitignore 36B
MIT-LICENSE 1KB
README.md 5KB
共 81 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 1961ee27df03bd4595d28e24b00dde4e_744c805f7e4fb4d40fa3f695bfbab035_8(1).c
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- windows注册表编辑工具
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- 校园通行码预约管理系统20240522075502
- 车类型数据集6250张VOC+YOLO格式.zip
- The PyTorch implementation of STGCN.STGCN-main.zip
- 092300108.cpp
- 车类型数据集6000张VOC+YOLO格式.zip
- for daily read
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功