kl3ryk/symfony-facebook-authentication-bundle

This package provides Symfony2 bundle for Facebok authentication.

1.1.1 2013-08-24 14:56 UTC

README

This bundle provides ready to use Facebook Authentication solution.

Usage

Basic configuration

# config.yml

facebook:
    application_id: "your_application_id"
    secret: "your_application_secret"
# security.yml

firewalls:
    your_firewall:
        facebook: true
        pattern: /

Requesting User Permissions

# config.yml

facebook:
    application_id: "your_application_id"
    secret: "your_application_secret"
    permissions:
        - example_permission_a
        - example_permission_b
        - example_permission_c
# security.yml

firewalls:
    your_firewall:
        facebook: true
        pattern: /

Using Custom User Provider

# config.yml

facebook:
    application_id: "your_application_id"
    secret: "your_application_secret"
# security.yml

providers:
    your_user_provider:
        id: your.user.provider.service.id

firewalls:
    your_firewall:
        facebook: true
        pattern: /
        provider: your_user_provider

Using Custom Authentication handlers

# config.yml

facebook:
    application_id: "your_application_id"
    secret: "your_application_secret"
# security.yml

firewalls:
    your_firewall:
        facebook:
            failure_handler: your.authentication.failure_handler
            success_handler: your.authentication.success_handler
        pattern: /

Using Several Facebook Applications

# config.yml

facebook:
    application_id: "your_default_application_id"
    secret: "your_default_application_secret"
# security.yml

firewalls:
    your_foo_firewall:
        facebook: true
        pattern: /foo

    your_bar_firewall:
        facebook:
            application_id: "your_other_application_id"
            secret: "your_other_application_id"
        pattern: /bar

    your_baz_firewall:
        # default APP configuration, custom permissions
        facebook:
            permissions:
                - example_permission_a
                - example_permission_b
                - example_permission_c
        pattern: /baz

Semantic Versioning

This repository follows Semantic Versioning 2.0.0.