Secure Web services with Oauth in PHP - php

I want to implement Oauth to protect my PHP Web Services,i have been following this link but found that some of them link are not working.And the working example had implemented in slim,flight some different frameworks in php and i'm newbie in it.My problem is i want to implement Oauth in Codeignter framework to protect Web Service and as per oauth site i've got a link by Alex Bilbie which is deprecated and not working. So if someone had done this before in codeigniter please let me know , Simple PHP would be also fine, later on i can modify it to fit in codeigniter.

I find Brent Shaffer's OAuth2 Server Library for PHP an excellent library!
In the cookbook you can find many examples on how to integrate it into certain frameworks, unfortunately CodeIgniter isn't one of them. But the documentation is very good, and you can use the cookbooks on the other frameworks as a guide for doing it in CodeIgniter.
You can find the library on Github.

Related

I want to login with twitter in Cakephp2.5.4

I am a new in cakephp 2.x platform. Now I am trying to connect my application login with twitter. I get lots of tutorial from the net. But all are not specified exactly for better understanding.
I'm searching for some docs or examples on CakePHP and logging in with Twitter.
If I use this program, do I have to download the Opauth CakePHP plugin? Is this plugin a must or is it optional, if I didn't use this plugin can I run this program?
Please show me some good tutorials for this program.
Have to tried this tutorial given by Mifty - http://miftyisbored.com/complete-social-login-application-tutorial-cakephp-2-3-twitter-facebook-google/
Please try this, it will help you.

CodeIgniter Authentication System that allows 3rd party auth?

My question is rather simple. Is there a system for CodeIgniter that allows both local and 3rd party login? (Such as FB/Twitter/Google etc.)
I've tried A3M but it's hard to use and requires tinkering before it will even work out of the box, as is the case with outdated software.
My current solution is flexi auth, however it doesn't offer 3rd party login at all, and after an email to the developer it doesn't look like he's planning on integrating it anytime soon.
So does anyone know of a good system that is up-to-date and provides both 3rd party and local login?
If there isn't one, what other PHP framework does have such a package?
Edit for Clarity: I'm looking for a system that does both these things. While I appreciate the answers and comments with systems that I can integrate myself, the end result of that will be shaky at best. There's gotta be someone who's done this before, all integrated into one package so it's designed to work together.
I was also looking for something like this just a month ago, but unsuccessfully. The only framework that has it all integrated in a simple way that I have seen is meteor, but it is not a PHP framework.
I had to do it myself by wrapping different PHP libraries in CI libraries. The source code is on github: CI Twitter and Who You Meet (a live web app), that has Twitter, LinkedIn and Facebook authentication and also a lot of local authentication logic with email verification and password recovery.
I know it can be considered a shameless promotion, but I hope it is useful. Although it is not exactly what you are looking for, it seems to be rather stable, so feel free to re-use it.
Maybe you will have time to extract all this logic in a standalone library (like I did for twitter) for other folks to use :)
If you want a CI OAuth2 implementation you can use this library which is both client and server:
https://github.com/alexbilbie/CodeIgniter-OAuth-2.0-Server
Otherwise for OpenID use this library:
https://github.com/EllisLab/CodeIgniter/wiki/OpenID

OAuth 2.0 Server for PHP

I have been struggling to find an active open-source PHP project that supports OAuth 2.0 as a server. There are tons of client examples that connect to Facebook, Twitter, etc. but as more and more people want to expose their own services through an API I'm a bit surprised the open source community hasn't addressed this need already. It's not that there is nothing but what's there is mostly out-of-date, little-to-no documentation, and very little to no activity in terms of current development and conversation.
Am I missing a good open-source option out there? Does anyone know of any commercial options? I really need to get something in place soonish and I personally don't have the bandwidth or security credentials to tackle this problem myself.
After much searching around I believe I have found the best solution for PHP'ers out there. Opinions are a dime a dozen but here's my favourite:
http://bshaffer.github.io/oauth2-server-php-docs/
Very active, high quality conversation and a solid product along with good (and improving) documentation.
Here is the list of available server and client libraries:
http://oauth.net/2/
which leads to a github project which is maintained.
oauth2 server by php league is much more followed and downloaded project on github. My personal experience has been awesome and the best part is it's documentation. Excellent implementation of oauth2.
According to http://www.zimuel.it/oauth2-apigility/ & http://apigility.org/documentation/auth/authentication-oauth2
You now can implement OAuth 2.0 Server using the open source project Apigility, with Brent Shaffer's implementation underneath...
in the end...
The OAuth2 implementation in Apigility uses the oauth2-server-php
library by Brent Shaffer. Apigility uses a PDO database to store all
the information related to the OAuth2 protocol. You can create your
database using the schema reported in the file
/vendor/zfcampus/zf-oauth2/data/db_oauth2.sql under your Apigility
installation folder (zf-apigility-skeleton).

YouTube API + PHP + site hosting?

I have made a site which can pull and upload videos from and to YouTube,
http://www.tole-rants.com/
This site was made with the combination of Python, Google App Engine and YouTube API. It is hosted at Google App Engine. I did not code the main structure of this application bcos I don't speak Python so I was made with a Python programmer. However, we found that this application has been causing lot of problems, especially on uploading videos.
Now I hope I can code the entire site myself with PHP - is it possible?
Another big question - do I have to host this site on Google's?? Can I just host this site on a normal/ standard server which I normally do when I develop a website?
I have read the documentation about YouTube API for developers, but I still cannot get my head around if I want to make this site from scratch with PHP.
It seems to suggest that using a PHP framework - Zend Framework, which I have no clues about it - do I really have to use a PHP framework then?
Any thoughts/ better suggestions or any online tutorials/ books I can follow through?
Many thanks,
Lau
No you dont have to host it on Google's. You can host it anywhere. And you don't need to use the Zend Framework. What they are suggesting is that you use the Zend framework's GData library to communicate with YouTube API. But you wouldnt even need that. YouTube Data API documentation is complete with examples. I am sure it will help you. But ofcourse if you have some specific questions you can ask them here.

PHP library for OpenID

About to start working on a social networking site, but I'd like to incorporate OpenID logins.
The JanRain plugin is packed in Debian, but seems flakey, and my brief interactions with it so far have not gone well. There's a bunch of others out there, but which ones are people using in production?
The OpenID Wiki has a great list of libraries available for PHP. Always begin your searches in the official documentation.
I have personally used and recommend EasyOpenId (requires PHP OpenID).
See PHP library for openID for a list of other PHP OpenID libraries.
I personally use the PEAR OpenID library.
I've used the Zend_OpenID library from the Zend Framework and had good success with that. Very easy to setup and very easy to use. Their documentation on it is pretty extensive as well and comes with some good code samples that should show you everything you need to know. I used this briefly on one of my sites I was working on and only removed it because users didn't like OpenID in general. But the implementation was quick and easy.
Zend Framework OpenID Documentation

Categories