GSA Cookie 验证 - "Login form doesn't have both text and password inputs"
GSA Cookie Auth - "Login form doesn't have both text and password inputs"
我似乎无法找出我用来设置 cookie 身份验证的登录表单有什么问题,在以通用登录表单提交我的凭据后,GSA 向我抛出此错误(服务日志):
Got form; name=customlogin clientLogin; action=/content/marketing/en/login/j_security_check; type=hidden, name=resource; type=hidden, name=_charset_; type=hidden, name=j_username; type=hidden, name=j_password
Login form doesn't have both text and password inputs
Error in authentication module: Login form doesn't have both text and password inputs
这是我正在使用的表格:
<form method="POST" action="/content/marketing/en/login/j_security_check" id="form_customlogin" name="customlogin clientLogin" enctype="multipart/form-data" onsubmit="return cq5forms_validate_customlogin();">
<input type="hidden" name="resource" value="/content/operations/apps/en.html" />
<input type="hidden" name="_charset_" value="UTF-8" />
<input id="username" type="hidden" name="j_username" value="anonymous-user" />
<input id="password" type="hidden" name="j_password" value="anon" />
<p>
Or go straight through as a
<a href="#" onclick="$('#form_customlogin').submit();">guest</a>
(limited access)
</p>
</form>
是否有人知道必须如何构建表格才能让 GSA 使用它?非常欢迎。
提前致谢!
编辑:显然,inputfilds user/pw 必须有用户名和密码类型,它们不能被隐藏。
这已经是一项功能请求。
用户名字段必须是 type="text",没有 type="username"。出于好奇,你为什么要隐藏它们?
很多时候,当您有复杂的登录表单时,最好的办法是为 GSA 创建一个单独的登录表单,不包含任何 JavaScript 或其他古怪内容。
我似乎无法找出我用来设置 cookie 身份验证的登录表单有什么问题,在以通用登录表单提交我的凭据后,GSA 向我抛出此错误(服务日志):
Got form; name=customlogin clientLogin; action=/content/marketing/en/login/j_security_check; type=hidden, name=resource; type=hidden, name=_charset_; type=hidden, name=j_username; type=hidden, name=j_password
Login form doesn't have both text and password inputs
Error in authentication module: Login form doesn't have both text and password inputs
这是我正在使用的表格:
<form method="POST" action="/content/marketing/en/login/j_security_check" id="form_customlogin" name="customlogin clientLogin" enctype="multipart/form-data" onsubmit="return cq5forms_validate_customlogin();">
<input type="hidden" name="resource" value="/content/operations/apps/en.html" />
<input type="hidden" name="_charset_" value="UTF-8" />
<input id="username" type="hidden" name="j_username" value="anonymous-user" />
<input id="password" type="hidden" name="j_password" value="anon" />
<p>
Or go straight through as a
<a href="#" onclick="$('#form_customlogin').submit();">guest</a>
(limited access)
</p>
</form>
是否有人知道必须如何构建表格才能让 GSA 使用它?非常欢迎。
提前致谢!
编辑:显然,inputfilds user/pw 必须有用户名和密码类型,它们不能被隐藏。 这已经是一项功能请求。
用户名字段必须是 type="text",没有 type="username"。出于好奇,你为什么要隐藏它们?
很多时候,当您有复杂的登录表单时,最好的办法是为 GSA 创建一个单独的登录表单,不包含任何 JavaScript 或其他古怪内容。