Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How can I protect my URLs from being accessed outside my app?

for example if I have a profile photo like this:

https://www.mydomain.com/gallery/profiles/USER_ID.JPG

and I want this user to be accessed only from my app

Which means if the user tries to access this user from a browser then it should give an error.

How can I do that please?

*** I am using Xamarin with PHP backend


Thanks,
Jassim

What I have tried:

Nothing because I am not sure what and how to do it
Posted
Comments
[no name] 21-Feb-20 14:13pm    
Just embed the photo in your app. And don't put it out in public otherwise.
ZurdoDev 21-Feb-20 16:08pm    
Look into authentication.
Jassim Rahma 21-Feb-20 16:10pm    
How with a URL? I know how to do it with a web service only. but this is just a regular url?
ZurdoDev 21-Feb-20 16:22pm    
A url has to be hosted by something, such as a webservice or a website. Authentication is the process of locking down what can be accessed in a website and by whom.
Jassim Rahma 22-Feb-20 12:50pm    
Yeah but let's say I am hosting the salary certificate under:

https://www.domain.com/EMPLOYEE_NUMBER/docs/DOC_ID.PDF

then anyone guessing (for example) the URL will be able to access it using a browser even if they are not logged on to my portal with authenticated user ID and password

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900