定制 athlan/revive-symfony-security-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

athlan/revive-symfony-security-bundle

Composer 安装命令:

composer create-project athlan/revive-symfony-security-bundle

包简介

Banner Google Web Designer hosting tool

README 文档

README

travis license version

This bundle allows you to enable Symfony Security authentication by providing Revive Aderver credentials.

It allow you to build custom tools around Revive in Symfony Framework.

Installation

  1. Add composer dependency
    "require": {
        // ...

        "athlan/revive-symfony-security-bundle": "1.0.0"

        // ...
    },
  1. Add bundle to AppKernel.php
    public function registerBundles()
    {
        $bundles = [
        
            // ...
            
            new Revive\ReviveAuthenticationBundle\ReviveAuthenticationBundle(),
            
            // ...

  1. Define several services in your container:
services:
    # create user session repository service
    revive_user_sessions:
        parent: revive_authentication.repository.user_session.xml_rpc
        arguments:
            # you can provide here custom configured xml_rpc client or get the existing pre-configured one
            - "@revive_authentication.xml_rpc.client"

            # address to your Revive xml-rpc
            # Example: http://domain.com/www/api/v2/xmlrpc/
            # you can use parameter mechanism here
            - "%revive_service_url%"

    # create form-autehnticacor that exchanges UsernamePasswordToken from user provided form
    # to ReviveAuthenticationToken
    revive_authenticator:
        parent: revive_authentication.authenticator.login_form_authenticator
        arguments: ["@revive_user_sessions"]

    # create logout listener to destroy remote sessions (optional, but recommended)
    revive_authenticator_logout_handler:
        parent: revive_authentication.authenticator.logout_handler
        arguments: ["@revive_user_sessions"]

  1. Configure security.yml
security:
    # regiter Revive user provider
    providers:
        revive:
            id: revive_authentication.user_provider.revive_user_prototype

    firewalls:
        main:
            anonymous: ~
            simple_form:
                # regiter Revive form authenticator
                authenticator: revive_authenticator
                check_path: /login
                login_path: /login
                csrf_token_generator: security.csrf.token_manager
            logout:
                path: /logout
                target: /
                handlers: [ revive_authenticator_logout_handler ]

    access_control:
        - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/, roles: IS_AUTHENTICATED_FULLY }

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固