2017 © Pedro Peláez
 

project openidconnectbundle

image

maps_red/openidconnectbundle

  • Wednesday, February 21, 2018
  • by maps_red
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

[WIP] OpenIDConnectBundle

The OpenIDConnectBundle adds OpenId connection in Symfony., (*1)

Step 1

Add OpenIDConnectBundle to your project

composer require maps_red/openid-connect-bundle

Enable the Bundle in the Kernel (< Symfony 4.0)

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Maps_red\OpenIDConnectBundle(),
    );
}

Import the routes.yaml

# config/routes.yaml
app:
  resource: '@OpenIDConnectBundle/Resources/config/routing/routes.yaml'

security.yaml (example)

    security:
        providers:
            webservice:
                id: open_id_connect.user_provider
        encoders:
            Maps_red\OpenIDConnectBundle\Security\User\User: bcrypt

        firewalls:
            dev:
                pattern: ^/(_(profiler|wdt)|css|images|js)/
                security: false
            test:
                http_basic: ~
                pattern: ^/(_(profiler|wdt)|css|images|js)/
                security: false
            main:
                anonymous: false
                guard:
                    authenticators:
                        - open_id_connect.guard_anthenticator

        access_control:
            - { path: ^/login, role: IS_AUTHENTICATED_ANONYMOUSLY }
            - { path: ^/, role: ROLE_USER }

The Versions