rizeway/cas-bundle

使用PHP CAS进行CAs身份验证

安装: 287

依赖: 0

建议者: 0

安全性: 0

星标: 3

关注者: 4

分支: 0

公开问题: 0

类型:symfony-bundle

dev-master / 0.1.x-dev 2013-07-18 11:01 UTC

This package is not auto-updated.

Last update: 2024-09-23 11:24:15 UTC


README

Symfony 2中的Cas身份验证

安装

1- 将依赖添加到你的 composer.json 文件中

"require": {
    "rizeway/cas-bundle": "0.1.x-dev"
},

2- 将bundle添加到你的 kernel app/AppKernel.php 文件中,以更新symfony Kernel

    $bundles = array(
        new Rizeway\Bundle\CasBundle\RizewayCasBundle(),
    );

3- 配置Symfony沙箱以使用RizewayCasBundle

编辑 app/config/config.yml 并添加你的配置

rizeway_cas:
    url: casServer.com:443/cas
    server: casServer.localhost:443/cas # (only if different from the url, for server to server requests)
    cert: /my-key.cert # false to bypass
    username_attribute: login
    proxy: true # if you want to active the proxy cas mode

4- 编辑 app/config/security.yml 文件以添加你的提供者和防火墙

    providers:
        CAS:
            id: my_user_provider

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        secured_area:
            pattern:    ^/demo/secured/
                cas:
                    check_path: /login/check
            logout:
                path:   /logout
                success_handler: cas.security.handler.logout

5- 编辑 app/config/routing.yml 文件以添加登录检查和注销路径的空路由