Developed with love by KnpLabs Hire us for your project!
41

ManticoraGoogleFederatedLoginBundle

by mgiustiniani

ManticoraGoogleFederatedLoginBundle

ManticoraGoogleFederatedLoginBundle

Build Status
Latest Stable Version
Latest Unstable Version
Total Downloads

knpbundles.com

this bundle add a relay party Implementation of FpOpenIdBundle for Google App Federated login

Usage

...

Installation

Download Packages

Add the following lines in your composer.json file:

{
    "require": {
        "manticora/google-federated-login-bundle": "dev-master"
    }
}

Now, run composer.phar to download the bundle:

$ php composer.phar install

Note: You can immediately start using it. The autoloading files have been generated by composer and already included to the app autoload file.

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Manticora\GoogleFederatedLoginBundle\ManticoraGoogleFederatedLoginBundle(),
        new Fp\OpenIdBundle\FpOpenIdBundle(),
    );
}

Step 3: Configure app/config/config.yml


manticora_google_federated_login:
    domain: example.com

Step4: Configure FpOpenId

Follow other instructions FpOpenIdBundle

Step5: Configure OpenId for your domain

Follow How to Setup OpenID with Google Apps

Step6: Add RelayParty in FpOpenId security.yml config

add relying_party:
yaml
security:
...
firewalls:
...
secured_area:
pattern: ^/admin #example path
fp_openid:
...
relying_party: manticora_google_federated_login.relying_party

add required_attributes:
yaml
security:
...
firewalls:
...
secured_area:
pattern: ^/admin #example path
fp_openid:
...
required_attributes:
[ contact/email, namePerson/first, namePerson/last, namePerson ]

see example
yaml
security:
...
firewalls:
...
secured_area:
pattern: ^/admin #example path
fp_openid:
create_user_if_not_exists: true # so createUserFromIdentity method will be called
provider: openid_user_manager # cf below
login_path: /admin/login_openid
check_path: /admin/login_check_openid
relying_party: manticora_google_federated_login.relying_party
required_attributes:
[ contact/email, namePerson/first, namePerson/last, namePerson ]

License

ManticoraGoogleFederatedLoginBundle is released under the MIT License. See the bundled LICENSE file for
details.

Bitdeli Badge

The MIT License (MIT)

Copyright (c) 2013 Mario Giustiniani

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
manticora_google_federated_login:
domain: ~ # Required