title: Authorizing users by downloading file from external SharePoint portal
body: <p>I have an open question about my idea. Here's some background:
  I'm developing a PHP application for the company I work in. It's meant to be used only by its employees. Every employee has access to our SharePoint portal. Basically the app has to be accessible only for people, that have access to our SharePoint.</p>
  
  <p>I've got an idea to use SP to authorize users in my app. Authorization would be based on downloading a secured file from SP (one for all users), using CURL. If the file is correctly downloaded you're logged in. If it isn't, you're not allowed to access the app (there would be exception handling of course). 
  So, each person, who has access to SP, would have access to the app. The app and SP are located at different servers.</p>
  
  <p>What do you think about that idea? Will it be safe? Is it a good idea at all?</p>
  
  <p>I've listed some pros and cons that came to my mind...</p>
  
  <p>Pros:</p>
  
  <ul>
  <li>easy to develop</li>
  <li>access control is held by SharePoint</li>
  <li>users don't have to learn new logins and passwords</li>
  <li>IMO it should be safe, because no passwords would be stored in the app's database</li>
  </ul>
  
  <p>Cons / vulnerabilities:</p>
  
  <ul>
  <li>possibility that the file will be accidentally deleted</li>
  </ul>
  
  <p>Cheers,
  Zibi</p>