通过 Wordpress 的 Icecast 身份验证

Icecast authentication via Wordpress

如何通过 Wordpress 实现身份验证?

这是我试过的:

<mount type="normal">
    <mount-name>/radio1</mount-name>
    <authentication type="url">
            <option name="listener_add" value="http://localhost:90/wordpress/wp-login.php"/>
            <option name="auth_header" value="HTTP 200 OK"/>            
    </authentication>       
</mount>

但是在日志文件中它说:

[2015-01-23 12:08:22] INFO auth_url/auth_url.c client auth (http://localhost:90/wordpress/wp-login.php) failed with ""

似乎凭证没有正确转发到 wordpress...

您需要匹配 Icecast 发送的内容 (http://icecast.org/docs/icecast-2.4.1/auth.html#url) 和 WP 登录表单。 我简单看了一下wordpress的默认表单,它使用:

  • 日志
  • 密码

Icecast 发送时:

  • 用户
  • 及格
  • (以及其他字段,见上文)

正如我在 IRC 上提到的,只需稍微修改 wp-login.php 以额外接受这些参数和 return 一个可靠的 header 用于登录成功。 或者更好的是 http://skookum.com/blog/using-wordpress-as-a-user-and-authentication-database/