我正在尝试在项目中使用 BeSimpleSsoAuthBundle,但我遇到了问题。
配置.yml
be_simple_sso_auth:
admin_sso:
protocol:
id: cas
version: 2
server:
id: cas
login_url: https://cas.XXX.com/ID/login
logout_url: https://cas.XXX.com/ID/logout
#validation_url: https://cas.XXX.com/ID/serviceValidate
安全.yml
security:
providers:
# Proveedor administradores
administradores:
memory:
users:
admin: { password: 123456, roles: ROLE_ADMIN}
firewalls:
# Backend
backend:
pattern: ^/backend/.*$
trusted_sso:
manager: admin_sso
login_action: false #BeSimpleSsoAuthBundle:TrustedSso:login
logout_action: false #BeSimpleSsoAuthBundle:TrustedSso:logout
create_users: true
created_users_roles: [ROLE_USER, ROLE_ADMIN]
check_path: /backend/login_check
login_path: /backend/login
use_referer: true
access_control:
- { path: ^/backend, roles: ROLE_ADMIN }
我创建此内存提供程序,因为如果没有,我会收到此错误消息:
InvalidConfigurationException: The child node "providers" at path "security" must be configured.
然后当我访问 /backend 时,它会重定向到登录 URL:https://cas.XXX.com/ID/login,就在这里!但是当我开始会话时,它重定向到:
/backend/login_check?ticket=ST-1383036359rD96A55DD1B77B754D4
我有一个例外
<url> malformed
500 Internal Server Error - ClientException
我知道那是因为“?ticket=ST-1383036359rD96A55DD1B77B754D4”,但我不知道如何解决。
谢谢!
----- 29/10/13 12:27 更新 -----
参数.yml
# This file is auto-generated during the composer install
parameters:
be_simple.sso_auth.client.option.curlopt_ssl_verifypeer.value: false
路由.yml
backend_login:
path: /login
backend_login_check:
path: /login_check
backend_logout:
path: /logout