dongping8572 2015-12-11 11:33
浏览 139
已采纳

劫持Moodle的登录页面

I'm creating an auth plugin for Moodle which is based on a token in a cookie which is created by another application. The Idea is that if the token in the cookie is not valid or missing a special custom site is displayed instead of the login site of Moodle. If the authentication was successful, the user should be redirected directly to a course page.

In the Moodle documentation for auth plugins there is the option to hook the loading of the login page to inject some content but it seems that there's no way to fully control what is rendered.

So how can I replace all the content of the default login site?

  • 写回答

1条回答 默认 最新

  • dongquepao8653 2015-12-11 12:24
    关注

    Use the loginpage_hook function to either display a complete error page or to redirect to another page that will do this.

    Take a look at auth/cas for an example of this in operation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 VUE项目怎么运行,系统打不开
  • ¥50 pointpillars等目标检测算法怎么融合注意力机制
  • ¥15 关于超局变量获取查询的问题
  • ¥20 Vs code Mac系统 PHP Debug调试环境配置
  • ¥60 大一项目课,微信小程序
  • ¥15 求视频摘要youtube和ovp数据集
  • ¥15 在启动roslaunch时出现如下问题
  • ¥15 汇编语言实现加减法计算器的功能
  • ¥20 关于多单片机模块化的一些问题
  • ¥30 seata使用出现报错,其他服务找不到seata