diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-09-28 19:22:55 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-09-28 19:22:55 -0400 |
| commit | 8bf5b7f2e3be707523d202066f0c14dcd172f46a (patch) | |
| tree | 8ea0564be09bd416ee05fc0f74e80a18d52a66f1 /StoneIsland/platforms/ios/www/js/sdk/auth.js | |
| parent | ef694896c0d53f5dbd49377e5b2382368846ad65 (diff) | |
build
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/sdk/auth.js')
| -rw-r--r-- | StoneIsland/platforms/ios/www/js/sdk/auth.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/StoneIsland/platforms/ios/www/js/sdk/auth.js b/StoneIsland/platforms/ios/www/js/sdk/auth.js new file mode 100644 index 00000000..911da902 --- /dev/null +++ b/StoneIsland/platforms/ios/www/js/sdk/auth.js @@ -0,0 +1,35 @@ +/* + 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 + auth.name = name + + // ios: integrate keychain api + // android: cordova.file.externalRootDirectory api + + auth.set_user = function(user_id, access_token, name){ + // persist user data + auth.user_id = user_id + auth.access_token = access_token + auth.name = name + } + auth.get_user = function(cb){ + // fetch user data + } + + return auth +})()
\ No newline at end of file |
