intracto / fas-open-id-bundle
Bundle that makes it easy to authenticate using Fas Open Id
Installs: 1 609
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 5
Type:symfony-bundle
Requires
- php: ^7.1 || ^8.0
- ext-json: *
- doctrine/doctrine-bundle: ^1.12.13 || ^2.0
- phpseclib/phpseclib: ^2.0
- symfony/framework-bundle: ^5.4
- symfony/http-client: ^5.4
- symfony/monolog-bundle: ^3.3
- symfony/security-bundle: ^5.4
Requires (Dev)
- symfony/phpunit-bridge: ^4.3
- dev-master
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-symfony5
- dev-dependabot/composer/doctrine/doctrine-bundle-tw-2.4
- dev-dependabot/composer/symfony/phpunit-bridge-tw-5.3
- dev-dependabot/add-v2-config-file
- dev-dependabot/composer/phpseclib/phpseclib-tw-3.0
- dev-meta
This package is auto-updated.
Last update: 2024-10-25 17:17:21 UTC
README
With this bundle, users of your application will be able to login into the application using FAS (Federal Authentication Service) using OpenId.
Installation
Applications that use Symfony Flex
Open a command console, enter your project directory and execute:
$ composer require intracto/fas-open-id-bundle
Applications that don't use Symfony Flex
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require intracto/fas-open-id-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
Then, enable the bundle by adding it to the list of registered bundles
in the config/bundles.php
file of your project:
// config/bundles.php return [ // ... Intracto\FasOpenIdBundle\IntractoFasOpenIdBundle::class => ['all' => true], ];
Step 3: register bundle routing
Load the bundle's routing inside your application
intracto_fas_open_id: resource: "@IntractoFasOpenIdBundle/Resources/config/routing.xml"
Step 4: Configuration
Bundle configuration
(If not done by Flex, create a intracto_fas_open_id.yaml file in your config/packages folder).
Config parameters needed to get this bundle working:
client_id
: the client ID of your registered applicationclient_secret
: the client secret of your registerd applicationscope
: list of scopes that will be used by this application. Possible values are profile, egovnrn, certificateInfo, citizen, enterprise and roles. The role openid will automatically be usedauth_path
: the route name where theFasOpenIdAuthenticator
will check to authenticate the user. The default value for this parameter isintracto_fas_open_id.auth
target_path
: the route name where the user will be redirected to on successful authenticationlogin_path
: the route name where the user will be redirected to when he has to loginuser_class
: FQN of your user class, this is optional. Make sure your user extends the User class of this bundle
Firewall configuration
Then, you have to tell the firewall(s) of your application which authentictor should be used. Under the guard parameter of your firewall(s), you have to append the intracto.fas_open_id.authenticator
to the authenticators parameter.
security: providers: intracto_fas_open_id_user_provider: id: intracto.fas_open_id.user_provider ... my_firewall: ... guard: ... authenticators: - intracto.fas_open_id.authenticator provider: intracto_fas_open_id_user_provider
If you want to log out from FAS, add the intracto.fas_open_id.logout_handler
to your firewall logout handlers.