doujiao1981 2014-09-10 20:11
浏览 91

需要帮助在Laravel 4中配置CAS身份验证

I'm writing a PHP web application on Laravel 4 that does user authentication with my university's CAS (Central Authentication Server). I am using this package to do the CAS authentication: http://packalyst.com/packages/package/xavrsl/cas

Here is my configuration file for the CAS authentication: CAS Config
Here is my 'User' model that is referenced in the CAS Config: User Model

My current problem is actually checking the authentication itself after the user has logged in (using a simple check, if isAuthenticated() echo "Authenticated"). Laravel throws this error when trying to use the isAuthenticated function: Laravel Error and Exception thrown.

Background about how the authentication should work: Since no passwords are stored in the application database (just in the CAS), I'm planning on checking the authentication via CAS, and then associating their ULID (university username) with a permission setting using the Entrust package (Entrust).

Is this a feasible way to do the authentication and then control user permissions? Normally user authentication and permissions wouldn't be such a problem for me, but adding CAS into the equation is just making this a bit tough, especially with me being new to Laravel.

  • 写回答

1条回答 默认 最新

  • dongxing2030 2014-09-10 21:02
    关注

    Found the solution to my problem. I removed the 'User' from the cas_uri in the config and everything works A-OK now.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog