Ignore:
Timestamp:
Apr 25, 2012, 10:42:52 PM (10 years ago)
Author:
work@…
Message:
  • changed application wide secret into a user specific api key which is automatically generated when a user is created. The key is available in the user's profile or through the user administration pages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/api/index.gsp

    r2214 r2225  
    5555<h2>prerequisites</h2>
    5656    <li>a valid username / password with role ROLE_CLIENT (see <a href="#authenticate">authenticate</a>)</li>
    57     <li>a shared secret (used to calculate the validation md5 hash)</li>
     57    <li>an api key (used to calculate the validation md5 hash.
     58        <sec:ifLoggedIn>
     59            Get your api key <g:link controller="userRegistration" action="profile">here</g:link>
     60        </sec:ifLoggedIn>
     61        <sec:ifNotLoggedIn>
     62            Login to get your api key
     63        </sec:ifNotLoggedIn>
     64    )</li>
    5865    <li>a deviceID / clientID (look <a href="https://github.com/4np/UIDevice-with-UniqueIdentifier-for-iOS-5" target="_new">here</a> for iOS)</li>
    5966
     
    6673    <li><a href="#getMeasurementDataForAssay">getMeasurementDataForAssay</a> - fetch all measurement data for a given assay</li>
    6774
     75<h2>SDK packages</h2>
     76    <li><a href="https://github.com/4np/gscf4php" target="_new">PHP</a> - Object Oriented SDK for interacting with GSCF</li>
     77
    6878<a name="authenticate"></a>
    6979<h1>authenticate</h1>
     
    8999<p>
    90100    Every subsequent request the client does, needs to contain the validation MD5 hash, which is a MD5 sum of the concatenation of the device token,
    91     the request sequence and a shared secret (e.g. <i>md5sum( token + sequence + shared secret )</i> ).<br/>
     101    the request sequence and the api key (e.g. <i>md5sum( token + sequence + api key )</i> ).<br/>
    92102    <i>Note that in order to be able to successfully authenticate or use the API in general, the user should have the ROLE_CLIENT assigned!</i>
    93103
     
    172182            <td>string</td>
    173183            <td>-</td>
    174             <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + shared secret )</td>
     184            <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + api key )</td>
    175185            <td>9ae87836d38d4b86be6aeff93f2b049a</td>
    176186            <td>yes</td>
     
    212222            <td>string</td>
    213223            <td>-</td>
    214             <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + shared secret )</td>
     224            <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + api key )</td>
    215225            <td>9ae87836d38d4b86be6aeff93f2b049a</td>
    216226            <td>yes</td>
     
    260270            <td>string</td>
    261271            <td>-</td>
    262             <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + shared secret )</td>
     272            <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + api key )</td>
    263273            <td>9ae87836d38d4b86be6aeff93f2b049a</td>
    264274            <td>yes</td>
     
    308318        <td>string</td>
    309319        <td>-</td>
    310         <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + shared secret )</td>
     320        <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + api key )</td>
    311321        <td>9ae87836d38d4b86be6aeff93f2b049a</td>
    312322        <td>yes</td>
     
    516526        <td>string</td>
    517527        <td>-</td>
    518         <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + shared secret )</td>
     528        <td><a href="http://www.miraclesalad.com/webtools/md5.php" target="_new">md5sum</a>( token + sequence + api key )</td>
    519529        <td>9ae87836d38d4b86be6aeff93f2b049a</td>
    520530        <td>yes</td>
Note: See TracChangeset for help on using the changeset viewer.