简体   繁体   中英

Google SAML APP SSO authentication in php application

I have php application build in Laravel and hosted it in a server.

I have also created a (G-suit) google admin account( https://admin.google.com ) with my domainname( http://www.example.com ) as a admin i have created few users (abc@myhost.com, xyz@myhost.com) from the google admin console.

Now Instead of creating a full authentication system in my application, What i want is that my users can login to my php application with the email address that i have created for them as admin.

How can i do this ?

You could integrate 'simpleSAMLphp' ( https://simplesamlphp.org/docs/stable/simplesamlphp-sp ) into your app. Then your app will act as a SAMLv2 ServiceProvider and will consume SAMLv2 assertions issued by Google SAMLv2 IdP ( https://support.google.com/a/answer/6087519?hl=en ). There are also other PHP-based SP-implementations available, or you could use SAML SP Apache http server module if you are using Apache http server.

You may check this documentation about user accounts. It says that to create a user account using one of your domains, use the following POST request and include the authorization described in Authorize requests .

POST https://www.googleapis.com/admin/directory/v1/users

You may check on this example .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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