0

I have an asp.net web project where it acts as a web service for my ipad application. I show pdf files from servers public address in my ipad project with UIWebView. I added the folder to hidden segments in web config but this rejects all incoming requests. what i need right now is to reject users trying to access pdf files from web browser and only allow logged in users of ipad application to view the files in a uiwebview.

Codette
  • 1,007
  • 2
  • 9
  • 18
  • 3
    This will answer your question: http://stackoverflow.com/questions/5155479/how-do-i-check-if-the-useragent-is-an-ipad-or-iphone – Alexander Sep 11 '14 at 08:14
  • This would allow users on ipad safari browser to see my files though. I want only my registered and accepted app users to be allowed to see the pdf files. – Codette Sep 11 '14 at 08:21
  • How do they log in to your application? Can you send a cookie with the request indicating the source? – Alexander Sep 11 '14 at 09:23
  • they enter the email address and password to server's currently public web service's login function with post method and if server sends "True" then userid and loggedin info is kept in ipad's memory. I haven't applied token based application yet for we are still testing the app. – Codette Sep 11 '14 at 10:34

1 Answers1

1

Use OAuth2 for Authentication at time of login.

When iPad app will use AFNetworking Extension for OAuth 2 Authentication to make request which will provide accessToken for each user differently.

To excess file user will have to provide accessToken to access files.

Paresh Navadiya
  • 38,095
  • 11
  • 81
  • 132