Note that there are some explanatory texts on larger screens.

plurals
  1. POGood method to authenticate files to users
    primarykey
    data
    text
    <p>I'm developing an <strong>API</strong> to <strong>let my users access to files stored on another server</strong>.</p> <p>Let's call my <strong>two servers</strong>, <strong>server 1</strong> and <strong>server 2</strong>!</p> <p><strong>server 1</strong> is the server im <strong>hosting my web site</strong>, and</p> <p><strong>server 2</strong> is the server im <strong>storing my files</strong>! </p> <p>My site is basically Javascript based one, so I will be using <strong>Javascript</strong> to post data to API when user needs to access files which are stored on <strong>server 2</strong>.</p> <p>when users requests to access files, the data will be posted to <strong>API URL</strong> via Javascript! API is made of PHP. <strong>Using that PHP script(API) on server 1</strong>, I will made another request to <strong>server 2</strong> asking for files so there will be another <strong>PHP script(API) on server 2</strong>.</p> <p>I need to know how should I do this <strong>authentication between two servers</strong> as server 2 has no access to user details on server 1?</p> <p>I hope to do that like this, I can use the method which is used by most payment gateways.</p> <p>When <strong>API on server 2</strong> received a request with <strong>some unique data of the user</strong> , post back those unique data through <strong>SSL</strong> to <strong>server 1 API</strong> and <strong>match them with user data in the database</strong>, then <strong>post back result through SSL to server 2</strong> so then server 2 knows file request is a genuine request.</p> <p>In this case <strong>what kind of user data/credentials</strong> server 1 API should post to server 2 and server 2 API should post back to server 1? and which user data should be matched with the data in the database? like user ID, session, cookies, ip, time stamp, ect!</p> <p>Any clear and described answer would be nice! Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload