Iphone应用程序访问安全的Web目录,需要创建目录的想法(Iphone App to Access Secured Web Directory , Need ideas in creating t

编程入门 行业动态 更新时间:2024-10-27 20:31:26
Iphone应用程序访问安全的Web目录,需要创建目录的想法(Iphone App to Access Secured Web Directory , Need ideas in creating the Directory)

我正在构建一个Iphone杂志应用程序。 我需要应用程序访问托管在Apache或IIS上的安全Web文件夹/目录,以便在HTTP文件夹中下载pdf mag文件。

传统的方法是使用.htaccess为Apache创建受密码保护的文件夹吗? IIS怎么样?

以及Iphone App访问文件夹的传统方式? 任何Xcode示例?

谢谢 。

I am building an Iphone Magazine App . I need the app to access a secured web folder/directory hosted on probably Apache or IIS to download pdf mag files inside the HTTP folder .

Is the conventional way of doing this by using the .htaccess to create a password protected folder for Apache ? How about IIS ?

And a conventional way for the Iphone App to access the folder ? Any Xcode example ?

Thanks .

最满意答案

好吧,传统的方法不是使用mod-autoindex(Apache)公开目录。 该目录实际上应该在服务器根目录之外,以给它一些相似的保护。

然后你会编写一个小的CGI(PHP,java servlet,ruby等),它强制执行某种类型的客户端身份验证方案,然后才会给你一个很好的列表,列出该目录中的内容。 它还可以负责将下载流发送到特定的pdf。 只有这个脚本才有权查看该目录中的内容。

因此,这肯定不是详尽无遗的,因为它涉及到安全性,但它应该指向正确的方向。 这实际上取决于您需要这个目录的安全性。

无论您采用何种方法,Xcode(Cocoa)都可以轻松访问任何远程URL信息。 查看NSURLConnection和本指南:

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html

Well, the conventional way would not be to expose the directory, using mod-autoindex (Apache). The directory should actually be outside the server root, to give it some semblance of protection.

Then you would write a small CGI (PHP, java servlet, ruby, etc), which enforces some sort of client-authentication scheme, and only then would it give you a nice list of what is in that directory. It could also be responsible for sending the download stream to a particular pdf. Only this script would have permission to view what's inside that directory.

So that's certainly not exhaustive as it pertains to security, but it should point you in the right direction. It really depends on how secure you need this directory.

Xcode (Cocoa) can easily access any remote URL information, regardless of the approach you take. Check out NSURLConnection and this guide:

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/URLLoadingSystem/URLLoadingSystem.html

更多推荐

本文发布于:2023-07-31 06:35:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1341873.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:目录   应用程序   想法   Web   Iphone

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!