/**
 * Created by mgoria on 09/01/15.
 */

'use strict';

import {Token} from './Token';

/**
 * Security token holds details about logged user
 */
export class LocalToken extends Token {
  /**
   * @param args
   */
  constructor(...args) {
    super(...args);
  }

  /**
   * @param {Function} callback
   */
  loadCredentials(callback = () => {}) {
    // use provider user id instead of cognito identity id for local backend
    this._identityId = this.identityProvider ? this.identityProvider.userId : null;

    callback(null, this);
  }
}

@@ -351,16 +351,74 @@
 %7B%0A    //
+ fake local credentials%0A    this._credentials = %7B%0A      //
  use pro
@@ -488,15 +488,11 @@
     
-this._i
+  I
 dent
@@ -496,18 +496,17 @@
 entityId
- =
+:
  this.id
@@ -557,16 +557,22 @@
 d : null
+%0A    %7D
 ;%0A%0A    c

Add fake local credentials for Local security token