简体   繁体   English

使用php单一登录gmail

[英]single sign on with gmail using php

I will have username and password of gmail I want to develop an application in which i have an login in my site.When i do login in my site . 我将拥有gmail的用户名和密码,我想开发一个在我的站点中具有登录名的应用程序。 I must get automatically login into gmail.There must be a link when the user clicks on the link he must be automatically get login into the site. 我必须自动登录gmail。当用户单击该链接时,必须有一个链接,他必须自动登录该站点。 I will demostrate it with am example 我将举一个例子来说明

Username:XXXXX Password:XXXXX 用户名:XXXXX密码:XXXXX

Click here to go to gmail 单击此处转到gmail

It will be something like above on my Website.When user enters the Username and password And gets login and if he clicks on the link.He must be able to see his gmail account.I meam to say he must be login to gmail.. 就像上面在我的网站上一样。当用户输入用户名和密码并登录并单击链接时,他必须能够看到自己的gmail帐户。我的意思是说他必须登录gmail。

请参阅使用OAuth登录Google帐户-https: //developers.google.com/accounts/docs/OAuth2Login

You can either us Google's OpenID or SAML2.0 implementations. 您可以使用Google的OpenID或SAML2.0实现。

Have a look at SimpleSAMLphp . 看看SimpleSAMLphp It's a SAML/SAML2.0 implementation in PHP. 它是PHP中的SAML / SAML2.0实现。 We use it for our single sign on implementation. 我们将其用于实现单点登录。 It has some documentation on how to integrate with Google. 它包含一些有关如何与Google集成的文档。 However it's not a single library, it's the basis for an application. 但是,它不是单个库,而是应用程序的基础。 You may be able to strip it back the components you need. 您也许可以将其剥离回所需的组件。 It could be over kill depending on how far you want to take you single sign on solution. 取决于您要采用单点登录解决方案的程度,它可能会被彻底淘汰。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM