gorg/cas-bundle

在您的网站上实现CAS身份验证

安装: 533

依赖: 1

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 6

公开问题: 2

类型:symfony-bundle

dev-master 2015-11-20 15:06 UTC

This package is not auto-updated.

Last update: 2024-09-14 13:40:30 UTC


README

  1. 简介

此文件将帮助您安装和配置项目。

  1. 安装

a) 将包添加到项目根目录的 composer.json 文件中

"require": {
    ...
    "gorg/casbundle": "master"
},
"repositories": {
    "gorg": {
        "type": "package",
        "package": {
            "name": "gorg/casbundle",
            "version": "master",
            "source": {
                "url": "ssh://git@gofannon.gorgu.net:7999/GRAM/gorgcasbundle.git",
                "type": "git",
                "reference": "master"
            }
        }
    }
},

b) 参数 Symfony 沙箱以使用 GorgCasBundle

请编辑 app/AppKernel.php 文件以更新 symfony Kernel

    $bundles = array(
        /*
         ...
        */
        new Gorg\Bundle\CasBundle\GorgCasBundle(),
    );

b) 参数 Symfony 沙箱以使用 GorgCasBundle

请编辑 app/config/config.yml 文件并添加以下行

gorg_cas:
    user_class: Gorg\Bundle\UserBundle\Entity\User
    mapping_role_attribute: type
    mapping_username_attribute: username

c) 参数 Symfony 沙箱以使用 Gorg CAS 身份验证

请编辑 app/config/security.yml 文件以更新 symfony 安全策略

    # ...
    # If you want you can use a custom user provider
    # ...
    providers:
        CAS:
            id: cas.user_provider
# ...
    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        secured_area:
            pattern:    ^/demo/secured/
                cas:
                    cas_server: auth.gadz.org
                    cas_port: 443
                    cas_path: /cas/
                    ca_cert_path: ~
                    cas_protocol: S1
                    cas_mapping_attribute: username
                    cas_logout: /logout