ivan1986/loginza-bundle

This bundle integrate Loginza

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 4

Type:symfony-bundle

dev-master 2014-05-22 10:14 UTC

This package is not auto-updated.

Last update: 2024-04-22 11:42:47 UTC


README

This bundle is rewrited Zim32LoginzaBundle. https://github.com/zim32/Loginza-for-Symfony-2

  1. install - standart by composer

    "ivan1986/loginza-bundle": "dev-master",

    new Ivan1986\LoginzaBundle\Ivan1986LoginzaBundle(),

  1. Configure /app/config/security.yml

    providers: loginza: id:

    firewalls: : pattern: ^/ loginza: provider: loginza check_path: <>

  1. Create form for loginza whis token_url={{check_path|url_encode}}

    {% extends "::base.html.twig" %}

    {% block body %} <script src="//loginza.ru/js/widget.js" type="text/javascript"></script> Please login {% endblock %}

  1. Create user provider - it must implements LoginzaUserProviderInterface ( extends LoginzaUserProvider for example) and implements

    public function loadUserByIdentityAndProvider($identity, $provider, $loginza_info)

User has ROLE_LOGINZA_USER role after authentication