summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/sdk/auth.js
blob: a8489b5d0804b01bd893df6a5cd98d00b346acd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
      headers: {
        "x-yoox-appname": auth.appname,
        "x-yoox-account-token": auth.access_token,
        "x-yoox-device": auth.device,
        "x-yoox-api-key": auth.apikey,
      },
*/

var auth = (function(){
  var auth = {}

  auth.appname = "{API-TEST}"
  auth.apikey = "{API-KEY}"
  auth.device = "smartphone"

  auth.access_token = ""
  auth.user_id = -1

  // integrate keychain/cordova.file.externalRootDirectory api
  
  auth.set_user = function(user_id, access_token, name){
    // persist user data
  }
  auth.get_user = function(cb){
    // fetch user data
  }
  
  return auth
})()