php 很好的 Laravel 单点登录解决方案

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31241498/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 22:19:40  来源:igfitidea点击:

Good single sign-on solution for Laravel

phplaravellaravel-5single-sign-on

提问by lesssugar

I plan to introduce a single sign-on (SSO)to my Laravel 5 applications. Basically, I have two websites on different domains. The idea is simple: if I'm already authenticated on one of them, I don't need to sign in on the other.

我计划我的 Laravel 5 应用程序中引入单点登录 (SSO)。基本上,我在不同的域上有两个网站。这个想法很简单:如果我已经在其中一个上进行了身份验证,我不需要在另一个上登录。

I've been looking for a solution for a while now, but I would like to ask you: Do you know or can recommend a package or library to provide SSO to Laravel application?

我一直在寻找一个解决方案,但我想问你:你知道或可以推荐一个包或库来为 Laravel 应用程序提供 SSO 吗?

Native PHP solutions are also welcome. Thanks!

也欢迎原生 PHP 解决方案。谢谢!

回答by smartin

You can use the SAML standard in order to solve your SSO needs.

您可以使用 SAML 标准来解决您的 SSO 需求。

Review this github repository that help you implement a SAML service provider: https://github.com/aacotroneo/laravel-saml2

查看可帮助您实施 SAML 服务提供商的此 github 存储库:https: //github.com/aacotroneo/laravel-saml2

If you need to implement a SAML Identity provider you can use simpleSAMLphp and use Lavarel database as authentication source. https://simplesamlphp.org/docs/stable/simplesamlphp-idp

如果您需要实现 SAML 身份提供程序,您可以使用 simpleSAMLphp 并使用 Lavarel 数据库作为身份验证源。 https://simplesamlphp.org/docs/stable/simplesamlphp-idp

回答by Devasya Dave

You can try out the miniorange/saml-laravel-freepackage. It makes things quite simple as it also provides a GUI and also does the whole authentication thing own its own.

你可以试试miniorange/saml-laravel-free包。它使事情变得非常简单,因为它还提供了一个 GUI,并且整个身份验证都属于它自己的。