Omniauth is a wrapper that standardizes authentication with multiple third-party providers for Ruby on Rails applications.
For more information, see
https://github.com/intridea/omniauth/
Is there a similar library that does this for PHP web applications?
Looks like HybridAuth is one of the choices.
Check out Opauth. It's an OmniAuth-inspired authentication framework for PHP.
It allows developer to easily implement authentication to 3rd party providers simply by downloading and dropping strategies.
Disclaimer: I'm the author of Opauth.
This PHP oAuth API library comes with built-in support to integrate many oAuth servers, but it can be configured to access any other server that is not yet supported built-in. It supports either oAuth 1.0, 1.0a and 2.0 transparently under the same class API.
Look into OpenID, I am not familiar with the framework you're asking about but it seems to do what you are asking. The Stack Exchange network implemented it too, which is how we can login using Google accounts etc.
Related
How to connect identityServer3 to php application. I have application in asp.net MVC which is using IDS3 now i need to connect php client app with SSO integration base on IDS3.
I think this is less a question about IdentityServer3, and more a question of what OpenID Connect libraries are recommended for PHP.
http://openid.net/developers/libraries/
The OpenID web site lists three OIDC libraries for relying parties - the right one to choose depends on your web server (nginx, Apache) and application stack (e.g. Drupal).
Recommend you try the most lightweight first and see if it supports what you need.
https://github.com/jumbojett/OpenID-Connect-PHP
I am implementing same type of auth but get client secret validator error, do you have any docs? I m using openid-oauth2 library
At my company we use Google Apps.
I've written a dashboard application (PHP/Laravel) which is used throughout the organization. It has a custom authentication system, but I'd like to integrate it with other services we use.
The basic use case that I'm interested in is something like this: you come in to the office in the morning, sign in to your email, and you're automatically signed in to the dashboard.
I've been looking at OAuth & reading about how to implement it, but it's not clear to me that it will do what I want.
So the basic question is this: what can Google OAuth do for me?
You can use Google+ Signin which is an OpenID Connect compliant SSO mechanism built on top of OAuth. By extending your applications with OpenID Connect Resouce Provider (RP) functionality and pointing them to Google as the Provider (OP) you would achieve SSO across your applications.
For a list of OpenID Connect RP libraries/implementations that you may leverage for your applications, see: http://openid.net/developers/libraries/
I have a main website (which contain all data) and multiple client websites which fetch data from the main website. Each client website has access to different set of data on main website. I want to create a PHP based web API for this. This is my first API so I am not sure what is the best and most secure way to do this.
After some googling I found OAuth to be the most common authentication method for APIs. however in my case I want the client website to be configured once and then the communication should be automatic, i.e. communication should take place in background without any user interference. Is OAuth required for this scenario?
Or is there any other method I can implement here?
oauth is way to complicated to implement for your needs.
If you are using rest, i suggest using a basic-auth in the header and using SSL so that your communication is encrypted.
You could make a small SecurityFilter that checks if for any request with a url pattern /api/ that the basic-auth is correct and that it use SSL...
It really depends on how you are exposing your API.
If you are using REST, HTTP Basic Auth over HTTPS is sufficient. I see a lot of people try to implement their own solutions when the provided approach is quite sufficient.
If you are using SOAP, there is a SOAP-based approach you could use: WS-Security (which is just a standard using anything from SAML assertions to OAuth tokens).
If passing Basic Auth credentials over HTTPS is too "open" for you, in that the credentials are saved in config on the client server somewhere, OAuth2 is probably the best solution. Doing OAuth on the server side wouldn't require any user interaction. You just store your tokens in a server config and let the OAuth library take care of the rest. PHP has a library for this PHP OAuth Library. There are plenty of OAuth2 libraries for PHP. Just Google it.
After some more googling and research I found answer to my question:
The scenario I explained is an example of 2-legged oauth (one can find many articles about 2-legged and 3-legged oauth)
Also, OAuth is not difficult to implement, infact for a developer with good knowledge of API and Auth system its very easy.
Here's a link of very good php OAuth library with example code http://code.google.com/p/oauth-php/
I'm looking into writing an PHP REST API that would allow registered users interact with the web service from third party applications.
What I need the API to be able to do is:
provide support for secure user authentication
allow registered users to interact with the service from 3rd party applications
this applications should be registered and approved on the system beforehand (similar to twitter)
I was wondering what would be a good framework or library to start from that provides a good basis for such a service.
titel
Sounds like an OAuthProvider would do what you describe.
Here are some tutorials on how to make an OAuthProvider using PHP's OAuth module.
http://toys.lerdorf.com/archives/55-Writing-an-OAuth-Provider-Service.html
http://djpate.com/2011/01/13/how-to-write-a-complete-oauth-provider-in-php5/
You could try one of the OAuth libraries for PHP listed on http://oauth.net/code
I want to integrate openid authentication into my php application. It must support authentication from yahoo, google, aol, msn/hotmail/live (not sure if its support openid).
I have tried searching google and have been able to come up with anything useful. I will really appreciate advises and links to good tutorials.
Thanks in anticipation.
This looks like a pretty solid tutorial covering the Google part.
Googling for 'php openid implementation tutorial' yields lots of relevant links.
Good luck!
Take a look at Janrain Engage. With the free version you can choose 6 different providers.
EDIT:
They provide an single API for authentication using OpenID and other authentication methods. Services like Twitter, Facebook and Windows Live don't use OpenID but some other method (i.e. Twitter uses something based on OAuth). Instead of implementing every method yourself you can use one single unified API.