kleegroup/franceconnect-bundle
最新稳定版本:0.8
Composer 安装命令:
composer require kleegroup/franceconnect-bundle
包简介
Symfony 4, 5 & 6 OpenID security extension FranceConnect
README 文档
README
Synopsis
Symfony bundle for FranceConnect authentication.
Dependencies
- namshi/jose: Utilisé pour la vérification du JWT
- Mashape/unirest-php utilisé pour les appels REST
Installation
All the installation instructions are located in documentation. The installation is in two steps:
Usage
-
Add a link to the route " france_connect_login " in your template twig
<a href="{{ path('france_connect_login') }}" class="btnLink"> <img src="{{ asset('bundles/franceconnect/images/FCboutons-10.png') }}" alt="FranceConnect button"/> </a>
-
Add a controller that will handle the response
/** * @param Request $request * @Route("/france-connect-traitement", name="app.fc.return") * @Security("is_granted('IS_AUTHENTICATED_FRANCE_CONNECT')") */ public function franceConnectAction(Request $request) { $token = $this->get('security.token_storage')->getToken(); $token->getIdentity(); // json array provided by FranceConnect [...] }
-
Add FranceConnect script in your template
{% block javascripts %} <script src="http://fcp.integ01.dev-franceconnect.fr/js/franceconnect.js"></script> {% endblock %} -
Add FranceConnect block in your template
<div id="fconnect-profile" data-fc-logout-url="{{ url('france_connect_logout') }}"> <a href="#"> {{- identity.givenName ~ ' ' ~ identity.familyName|upper -}} </a> </div>
License
This bundle is under the MIT license.
统计信息
- 总下载量: 6.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-08-02