Download the PHP package bitgrave/persona-bundle without Composer

On this page you can find all versions of the php package bitgrave/persona-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package persona-bundle

Introduction

This Bundle enables integration of mozillas PERSONA verification API. It also provides a Symfony2 authentication provider so that users can login to a Symfony2 via persona's Remote Verification API. Furthermore via custom user provider support the persona login can also be integrated with some other data sources like the database based solution provided by the famous FOSUserBundle.

Note that logging in a user requires 3 steps:

  1. the user must have a valid personal authentification account
  2. you have to trigger the symfony2 login
  3. add the persona login button (twig helper) inside your login.html.twig template or any other place you like

In our example code lines below we'll presume the our local webserver is reachable under http://dev.example.com. please change this domain by our development base server here.

further information about persona verifaction api can be found on https://developer.mozilla.org/de/docs/persona

Please also refer to the official documentation of the SecurityBundle, especially for details on the configuration: http://symfony.com/doc/current/book/security.html

Prerequisites

This version requires Symfony 2.1

Installation

1 - Add the following lines in your composer.json:

2 - Run the composer to download the bundle

3 - Add this bundle to your application's kernel:

4 - Configure the persona service in your config:

4.1. If you want to use security component add this configuration and define a custom user provider class, use it as provider or define login path (you can replace the given name my_persona.persona_provider by any other (distinct) one) ...

5 - add routing for persona logincheck handler.

6 - (optional) add persona host-ident configuration inside your parameters.yml this step is not really necessary, you can place your host identification in config.yml (_bg_persona:)

7 - place this dummy controller inside your LoginController file. this code presume you've sendio FrameworkExtraBundle installed and implemented (Route and Template module), if not setup person routing (/persona_login_check) inside your default routing.yml file.

Include the persona login button in your templates

add the following code in your login template (thats a twig sample for persona CSS3 button):

Example Custom User Provider using the BG\PersonaBundle

This requires adding a service for the custom user provider which is then set to the provider id in the "provider" section in the config.yml:

The Custom User Provider Class:

Finally one also needs to add a getPersonaId() and setPersonaId() method to the User model. take note that field placements firstname and lastname not realy neccesary for our persona bundle implementation. The following example using the Doctrine ORM + FOSUserBundle:

How To Contribute

To contribute changes, fixes, additions/features please open a pull request with your new code. please take not, that if you add new features or modify existing ones you have to doc this in projects README file (also update projects CHANGELOG file!)

License

See: resources/meta/LICENSE.md

Credits

The bundle structure and documentation partially based on FOSFacebookBundle by FriendsOfSymfony on any open questions or problems feel free to contact me directly or just open an issue ...


All versions of persona-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
symfony/framework-bundle Version >=2.1,<2.3-dev
symfony/security-bundle Version >=2.1,<2.3-dev
symfony/twig-bundle Version >=2.1,<2.3-dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bitgrave/persona-bundle contains the following files

Loading the files please wait ....