SSO implementation using php - php

I have some open source application resides on my server as well as some other application.
Like open project, matter most, own cloud etc and i have to implement single sign on functionality for all of those application.
but don't know from where to start or how to proceed further. And my networking concept are really too weak.
I searched for LDAP client server,SAML but did not get relevant way to accomplish the task(Or the step wise process)
and wants to implement the system in laravel(PHP)
Please help me out to solve these challenging task.

The best SSO solution for PHP is simpleSAMLphp.
There's a lot of documentation there that will answer most of your questions.

Related

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

SaaS Application start from scratch

In terms of expansion of my knowledge, I would like to try to make an SaaS application. I dont really care of app funcionality, but I would like to learn about technology behind it. So my question is, would be someone so kind and show me where to start? some good reading, tutorials, articles or books? I am most interested in:
every user, after registration, has its own playground at username.domain.com
app should use some kind of master script which will generate content for all users
what are pitfalls of such app?
what technology backend is needed?
I am open to Ruby on Rails solution. Sorry for my bad english, hope I make it clear. Thanks
You want to build a multi-tenant solution.
Some things to consider:
Each one of your users should have an isolated database. This means you need to choose a database driver that can switch the database at run time. The id of database could be based on the user-part of the domain.
You can use Devise+cancan for registration. But you will need to redefine some Devise controllers so that they take in consideration the database.
You may consider reading Service-Oriented Design with Ruby and Rails by Paul Dix. It has a lot of interesting ideas that you can use to build an efficient service oriented app, which undoubtedly is the kind architecture that you should strive to create.
I suggest that you use Heroku to host your application. MongoHQ would be very nice for the databases - and they have an api to make CRUD on databases programatically.
And finally, remember to fully test your application. Capybara plus Steak for integration testing, RSpec for models and controllers and Jasmine for Javascript.
Also, don't implement your own payment system. There are a lot of providers that you can use like http://recurly.com/.
You may want to take a look at the Rails kit at http://railskits.com/saas/
If you prefer to build it your self, take a look at http://www.chargify.com to handle your payments.
Check the page SaaS application development using PHP in Zend Framework it provide details about building a SaaS appliation in PHP Language.
Have a look at this tutorial. It's exactly what you are asking for:
http://anantgarg.com/2013/06/10/build-a-php-saas-app-from-scratch/
This is for PHP, but you can easily adapt it to RoR.

Best way to implement a Rest API with PHP on WAMP web server

I own a web server running Windows (WAMP). I want to know the best way to implement a Rest API (a very simple one) in order to let a user do something.
Diagram flow:
alt text http://img215.imageshack.us/img215/6105/flowe.png
I have programming skills, in fact, I developed a web server in VB6 who process the queries and when it finds the command (http:/serverIP/webform.php?cmd=run&item=any) it does something, but I really want to develop a solution using the WAMP server.
Some people consider the solution of executing a exe when a command is detected a bad solution for security issues, but this specific project I have is for the use by some people (trusted people) who dont have intentions of hacking the server.
So, what do you think?
Remember:
Its not a public API, its for some people and some programs who will use
the API
Its a very simple one, only one command using POST or GET.
Thanks
Ive just recently finished a REST API project on PHP and it was a good experience. The way I see it, the fastest/easiest way to implement this is using the following elements:
Object Oriented PHP
MVC paradigm
Create a request dispatcher
I found this link very useful when I started, it should get you going in no time:
http://particletree.com/features/how-to-add-an-api-to-your-web-service/
Edit:
I didnt use this framework but it looked promising: http://tonic.sourceforge.net/
Also, CakePHP supports Rest and is a neat MVC framework. If you're looking to implement in no time, go with CakePHP.
Good luck!

Integrating 3rd party forum software with my own code

I'm about to start a new PHP project and I'm going to need to make use of 3rd party forum software.
What's the best way to tackle integration of the forum into my code? Things like user authentication, having the user only have to login once, etc.
I'll be using the CodeIgniter framework if that is of any help. I found the article on integrating Vanilla with CL Auth & CodeIgniter but it wasn't to my liking at all.
Does anyone have any specific recommendations on PHP forum software? I'm open to any suggestions or pointers/help.
In my experience Simple Machines Forums is relatively easy to integrate into existing code.
What comes to authentication, it may be easiest for you to use the forum's authentication in your application, rather than attempting to use your application's authentication in the forum. It doesn't matter which forum you choose to use - this is usually the esiest way, since forums tend to have complex code related to auth and access, which can be tricky to modify to use some other system.
I'm not real familiar with any particular forum software, but my advice when using and integrating 3rd party software is to try and abstract out the specifics as much as possible from your main code base.
Wrap your forum library calls for things such as authentication, etc so that if you need to later change your forum software, you can limit the scope of the changes.

Easiest way to implement an online order tracking database

I've been asked by a client to make an online tracking system for work we do for them (we will be typesetting a high volume of books for this client). Basically, it would be a database showing the books we are currently working on, with information on what stage of the project we are at, and estimated completion dates. The only people with access to this system would be us and employees of the client company.
I've worked in MySQL and PHP before; should I just go with what I know? This answer to a similar question suggests using Google Apps. I don't have any experience with Python, but happy to learn...
You're the only one using this therefore I see no reason to use Google Apps. I'm usually weary of people suggesting Google Apps, Amazon's s3, Microsoft Azure, etc. Also, you're going to be using a radically different data store. Unless you want an excuse to learn to do Google Apps and Python, I'd say go with MySQL+PHP and be done with it! In short, there aren't really any technical reasons for you to go with Google Apps here.
Sticking with what you know is always a good solution when dealing with delivering products to customers. No customer likes to be your guinea pig while you learn a new technology, although that's often how it's done. If you are comfortable with MySQL and PHP then stick with it if it satisfies your requirements, if it seems not to then look for libraries, frameworks and components written in PHP that might help you reach that goal. If you still have difficulties (unlikely given the scope of the project given) then ask questions here :) & search the web for solutions and patterns.
If all that fails and you can clearly solve your problem with another technology, then look at moving but make sure your customer is aware of how that's going to affect you timeframes.
When you've implemented this project and have some spare time, if there's a new direction you'd like to explore then use this project as your base and set to work without the stress of a deadline.
That's my 2p worth... good luck!
When developing a CRUD application such as this, you may be required to reinvent the wheel a little if starting from scratch. Many parts of your project are not unique to the project. E.g authentication, database access, form manipulation etc.
If getting things done is important to you it may be important to give your project a kick start and stop you wasting too much time.
Use a coding framework
Frameworks often have a lot of functionality ready for use straight out of the box.
Options may include Django, Ruby on Rails, Joomla, CakePHP, CodeIgniter.
Hack a tried and tested application
Open source projects are often quite easy to mould to your needs. Drupal and Joomla are CMS products which can be used in a wide variety of ways. If your book-tracking drupal module is any good, maybe you could go on to offer it as an open source plugin?
Use a currently available app in a new way
Your app seems to be tracking the status of items added to a database. How about using software designed for tracking other types of items. E.g. bug tracking software, project management to-do list software or customer relationship management software?
Well, as everyone has already said, if you already know PHP, that's got to be awfully tempting.
But it sounds simple enough that something like Django might save you a lot of time: its built-in admin interface could be used for the "update" side of the job, so all you'd need to template up is the "read" side, which is pretty easy.
I suggest you too look at Viravis.

Categories