使用 javascript 最佳方法的 HTTP 基本身份验证

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8846363/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 04:45:35  来源:igfitidea点击:

HTTP basic authentication using javascript best methods

javascripthtmlcordovahttp-authenticationbasic-authentication

提问by Droid646197

I have html5 + javascript +phone-gap app for ios. I need to connect to a protected url and pass HTTP basic authentication in base64 to get a rss feed. Am not using jquery in the app and look good advice and best practices to get this done.

我有适用于 ios 的 html5 + javascript +phone-gap 应用程序。我需要连接到受保护的 url 并通过 base64 中的 HTTP 基本身份验证以获取 rss 提要。我没有在应用程序中使用 jquery 并且看起来很好的建议和最佳实践来完成这项工作。

Thank you

谢谢

采纳答案by vrunoa

Maybe this article helps you; Basic javascript Http authentification code

也许这篇文章对你有帮助; 基本的javascript Http认证代码

There's a few tips to help you improve a basic javascript http authentification code.

有一些技巧可以帮助您改进基本的 javascript http 身份验证代码。