如何将带有 Devise 的 Rails 应用程序变成 SSO/CAS 服务器? [英] How to turn a Rails app with Devise into a SSO/CAS server?

查看:37
本文介绍了如何将带有 Devise 的 Rails 应用程序变成 SSO/CAS 服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从以前的问题 我一直在问错误的问题......我想把我的应用程序变成一个 CAS 服务器,以便应用程序的管理员可以使用相同的身份验证机制登录到我们为组织开发的其他应用程序.

I realized from a previous question that I had been asking the wrong question...I would like to turn my application into a CAS server so that admins of the application may use this same authentication mechanism to log into other applications that we develop for the organization.

你以前做过吗?是否有一个插件可以让 Devise 能够充当 CAS 服务器?我需要更改/添加什么才能将应用程序变成 CAS 服务器?

Have you done this before? Is there a plugin which adds the ability to Devise to be able to act as a CAS server? What do I need to change/add in order to turn the app into a CAS server?

推荐答案

检查这个类似的 问题,解释了 devise_cas_authenticable gem 的 rails 4 问题.

Check this similar question, that explains rails 4 issues with devise_cas_authenticatable gem.

对于服务器,你可以使用CASino作为服务器,看起来很干净.查看其安装指南.

For the Server, you may use CASino for the server, it looks very clean. Check its installation guide.

另一种解决方案,如果两个应用程序在同一个域中并且它们共享同一个数据库,您可以简单地修改会话 cookie,使其对指定域中的所有子域通用.

An Alternative solution, if both apps are on the same domain and they share the same database, you can simply modify the session cookie to be universal for all subdomains on your specified domain.

这篇关于如何将带有 Devise 的 Rails 应用程序变成 SSO/CAS 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆