News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

NetTuts.com:
Setting Up User Authentication in Laravel Using Confide
August 08, 2014 @ 11:05:24

NetTuts.com has posted a new tutorial recently showing how you can use Confide to set up authentication in a Laravel-based PHP application. Confide is a package specifically for Laravel that provides a lot of the usual needs for a user authentication system.

User authentication is part of almost every web application. Although it is common, a deeper look shows that it's not as simple as it may seem. Remember that validation, password recovery, and email confirmation are vital to any decent authentication form. Confide is an authentication solution for Laravel made to reduce the repetitive work involving the management of users. [...] In this tutorial, we'll start from the very beginning by creating our Laravel app using Composer and then: create a signup form with a full set of validation rules, a login form with a "forgot my password" option that will send a link for the user to redefine his password and use Laravel filters to only allow logged users can access a specific route.

The tutorial walks you through creating a simple Laravel application (obviously you can always use one you've already created) and getting Confide installed via Composer. Once you've added the provided lines to the Laravel configuration, you'll be ready to follow along with their examples. They run the migrations to set up the database and show how to view the user pages (and update their look to something a bit more friendly). The remainder of the post shows how to add in the pre-execute validation, via Laravel's filters, to ensure a user is logged in on certain routes.

0 comments voice your opinion now!
tutorial authentication laravel confide library

Link: http://code.tutsplus.com/tutorials/setting-up-user-authentication-in-laravel-using-confide--cms-21866

SitePoint PHP Blog:
Social Network Authentication Twitter and Facebook
July 21, 2014 @ 11:32:12

The SitePoint PHP blog continues their series of tutorials showing how to authentication your users against various social networks. In the previous post they covered connecting to Google+ and in this latest post they move on to two other popular social networks: Facebook and Twitter.

In the previous parts of this series, we created our initial interfaces, set up our Google+ login functionality and talked about how we can merge our accounts together. In this article, we will integrate Twitter and Facebook within our application. You will see a lot of similarities with the Google+ article, so if you could follow that one easily, you won't have much trouble with this one. If you haven't read that article yet, I suggest you read it first before continuing this article.

He starts off with the Twitter authentication, creating a new "SocialLogin" object type for it and defining the three required properties it needs to connect. Code is included to make the OAuth connection, pass along the callback URL and forward on the user to the Twitter site for approval. Code is also included to store the data about the Twitter user in your application. Next up is Facebook. The connection is very similar to the others with only a slight difference in the data that's required. You can find the full code for the tutorial so far in this Github repository.

0 comments voice your opinion now!
social network authentication tutorial series twitter facebook

Link: http://www.sitepoint.com/social-network-authentication-twitter-facebook/

SitePoint PHP Blog:
Social Network Authentication Merging Accounts
July 16, 2014 @ 12:19:07

The SitePoint PHP blog continues their series looking at authenticating your application against other social networking services with this new post discussing the merging of accounts. This merging allows you to determine if the same user is using more than one account to log into your system.

If you allow users to sign up through different social networks and perhaps your own registration system, there is a good chance some users will have multiple accounts. How annoying can it be for a user who signed up through Facebook earlier, to come back later and log in through Twitter because he thought he used that one? We can prevent this by letting the user merge manually or try to use an automatic system to try and identify duplicated users.

He tracks the information about the users in two different database tables, one for the user themselves and another representing that user's provider (the social network). He gives an overview of two methods you could use for merging these accounts: either doing it manually by suggesting it to the user or trying to do it automatically based on the data you already have.

0 comments voice your opinion now!
social network authentication tutorial series merge accounts

Link: http://www.sitepoint.com/social-network-authentication-merging-accounts/

SitePoint PHP Blog:
Social Network Authentication - Setup & Google+
July 15, 2014 @ 11:12:06

The SitePoint PHP blog has posted the first two parts of a "Social Network Authentication" series looking at connecting your application with social network systems. In these first two posts they help you get things set up to connect to the remote systems and create an actual connection to Google+.

Almost every website which contains a log in option, also contains ways to log in through different social networks. In this series of articles, we will take a look at how we can make sure that our visitor can log in through Google+ and eventually other networks like Twitter and Facebook. In the final article, we will have a close look at how we can make sure users don't have different accounts due to the fact that they used different social networks. We will create a framework agnostic package which can easily handle users from different social networks. In this part, we will have a look at our basic setup.

The first tutorial helps you get things all set up and takes the first steps in making the "SocialLogin" package. In the second tutorial they use this package structure to create a Google+ specific instance, making the OAuth connection as simple as calling a method, loading a URL and handling the response.

0 comments voice your opinion now!
social network authentication tutorial series googleplus

Link: http://www.sitepoint.com/series/using-social-networks-as-a-login-system/

Gonzalo Ayuso:
Token based authentication with Silex and AngularJS
June 09, 2014 @ 10:33:37

Gonzalo Ayuso has posted a tutorial showing how to use token-based authentication with a Silex-based application through a request from AngularJS.

According to my last post today we're going to create a AngularJS application that uses the Silex Backend that we create previously. The idea of this application is to use it within a Phonegap/Cordova application running in a mobile device.

He includes the code (and markup) you'll need to make the request work. Basically, it uses a standard HTTP service from inside AngularJS to fetch the token and store it in the client's localstorage. The rest of the code does the checking to see if the user is logged in (the token exists) or if it needs to sow the login form. The "logged in" route also displays an alert to the user with the info (pulled from the API) for their user. The full code for the example can be found over on GitHub.

0 comments voice your opinion now!
token authentication silex angularjs tutorial login localstorage

Link: http://gonzalo123.com/2014/06/09/token-based-authentication-with-silex-and-angularjs/

Jordi Boggiano:
Authentication management in Composer
May 28, 2014 @ 11:07:35

Jordi Boggiano has posted about a new feature in Composer, the popular dependency manager for PHP, around the handling of authentication information.

Up until today if you run a home-grown package repository serving private packages it was quite a pain to use with Composer. You did not have efficient way to password-protect the repository except by inlining the password in the composer.json or by typing the username/password every single time. With the merge of PR#1862 and some further improvements you can now remove credentials from your composer.json!

The new functionality allows for the external storage of the credentials in a file, either globally of in one relative to the repository. He also includes the command you can use to configure and set these username/password combinations and have them stored in the "auth.json" file.

0 comments voice your opinion now!
composer authentication management username password authjson json

Link: http://seld.be/notes/authentication-management-in-composer

Gonzalo Ayuso:
Token based authentication with Silex Applications
May 06, 2014 @ 10:56:32

Gonzalo Ayuso has put together a new post for his site showing how to do token-based authentication with Silex and the help of a few additional Symfony components.

What happens if we want to use a security layer [in a Silex application]? We can use sessions. Sessions are the "standard" way to perform authentication in web applications, but when our application is a PhoneGap/Cordova application that uses a Silex server as API server, sessions aren't the best way. The best way now is a token based authentication. The idea is simple. First we need a valid token. Our API server will give us a valid token if we send valid credentials in a login form. Then we need to send the token with each request (the same way than we send the session cookie with each request).

He includes all the code you'll need to follow along. His example shows a basic Silex application that fetches the token from the URL and uses middleware to handle the validation. There's a bit of CORS mixed in as well to make the cross-domain requests from the applications possible. He creates a service provider (for logins) and controller provider to handle each type of request.

0 comments voice your opinion now!
token authentication silex application tutorial

Link: http://gonzalo123.com/2014/05/05/token-based-authentication-with-silex-applications/

Ralph Schindler:
Authentication & Authorization in Apigility
March 27, 2014 @ 11:04:21

Those interested in the Apigility project from Zend might want to check out this new post from Ralph Schindler on how it handles authentication and authorization for all of the requests.

Apigility takes a lightweight, layered, yet extensible approach to solving both problems of authentication and authorization. The infrastructure is already in place and ready to be configured to use, or for more advanced use cases: to be extended. Many of these feature can be easily explored through the Apigility user interface.

He gets into authentication first, defining it briefly before getting into the Apigility-specific implementation. He talks about the three methods (HTTP basic, HTTP digest and OAuth2) and mentions where it falls in the execution as well as some screenshots of its setup. Following this he talks about the other half of the equation, authorization. He covers the "Authentication" header, the identity types and where you can find the configuration settings. He finishes off the post with an in-depth look at the different components, events and services/models that make up the authentication and authorization system and make it work.

0 comments voice your opinion now!
authentication authorization apigility introduction configuration

Link: http://ralphschindler.com/2014/03/26/authentication-authorization-in-apigility

NetTuts.com:
Laravel Unwrapped Session, Auth and Cache
March 11, 2014 @ 11:57:10

On NetTuts.com today there's a new tutorial introducing you to the Laravel framework and how to use its session, authentication/authorization and caching systems.

One thing though that not a lot of programmers take advantage of is Laravel's component-based system. Since its conversion to composer-powered components, Laravel 4 has become a very modular system, similar to the verbosity of more mature frameworks like Symfony. [...] In this tutorial, we'll be diving into a group of these components, learning how they work, how they're used by the framework, and how we can extend their functionality.

First up is the session component that lets you store the data in various places (file, cookie, etc) and how service providers fit into this. Next up is the Auth component, showing how to use the service providers to hook into a custom auth handler for finding and validating user logins. Finally, there's the Cache component. He shows how to apply a service provider to configure it, passing the data off to a MongoDB database to be stored.

0 comments voice your opinion now!
laravel tutorial session cache authentication serviceprovider framework

Link: http://code.tutsplus.com/tutorials/laravel-unwrapped-session-auth-and-cache--cms-19952

Gonzalo Ayuso:
Integrating WebSockets with PHP applications. Silex and socket.io playing together.
February 04, 2014 @ 09:37:25

Gonzalo Ayuso has a new post today showing you how you can integrate websockets with a PHP application using a combination of Silex and socket.io, a javascript library specifically made to work with them.

WebSockets are great. We can start a persistent connection from our browser to our server and use this connection to send real time notifications to our users. Normally when we integrate WebSockets with an existing Web application, we need to face with one slight problem. Our Web application runs on a Web server (imagine, for example one Silex application). We can use a login form and ensure all requests are authorized (using a security layer). This problem is solved years ago. We can use Basic HTTP authentification, Digtest authentification, a session based athentification, token based authentificatio, OAuth, The problem arrives when we add WebSocket server.

He mentions another solution - sharing an authentication mechanism between the frontend and backaned - but suggests something simpler using the bi-directional nature of websockets. To illustrate, he makes a simple Silex application and creates a basic template that makes the websocket request back to the localhost. He includes the simple code to make the socket.io server (node.js) and an example of using Express to handle the request and define the URL to call on the Silex application. He's also created a screencast showing the full process, start to finish.

0 comments voice your opinion now!
websockets socketio silex websockets tutorial authentication security

Link: http://gonzalo123.com/2013/12/24/integrating-websockets-with-php-applications-silex-and-socket-io-playing-together


Community Events





Don't see your event here?
Let us know!


deployment series library tips zendserver interview introduction api community podcast language opinion laravel release install symfony unittest package update framework

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework