如何使用url参数自动登录网站? [英] How to automatically login to the site using url parameters?

查看:647
本文介绍了如何使用url参数自动登录网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个链接 http://uuuu.com/index.jsp?username=user&password=pass . 如果用户单击链接,它将自动登录到该网站,并从该URL中读取用户名和密码. 因此,用户无需填写用户名字段和密码字段即可查看站​​点. 网址格式是否正确?如果不正确,该使用什么格式?

I had a link http://uuuu.com/index.jsp?username=user&password=pass . If the user clicks on the link it should be automatically login to the website with reading the username and password from that url. So the user no need to fill the username field and password field to view the site. Is the url format is correct?if not what is the proper format to do it?

推荐答案

我认为您需要的格式是

http://username:password@yoursitename.com

我仍然会建议您不要使用这种方法.您不应该通过URL传递用户名和密码!

I would still say that this approach is not recommended. You should not pass username and password through URL!

这篇关于如何使用url参数自动登录网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆