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.

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

报告相同问题?

悬赏问题

  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题