launch() {
    if (window.self !== window.top) {
      // Begin launch and authorization sequence
      this.JSONRPC.notification('launch');

      // We have a specific origin to trust (excluding wildcard *),
      // wait for response to authorize.
      if (this.acls.some((x) => x !== '*')) {
        this.JSONRPC.request('authorizeConsumer', [])
          .then(this.authorizeConsumer)
          .catch(this.emitError);

      // We don't know who to trust, challenge parent for secret
      } else if (this.secret) {
        this.JSONRPC.request('challengeConsumer', [])
          .then(this.verifyChallenge)
          .catch(this.emitError);

      // acl is '*' and there is no secret, immediately authorize content
      } else {
        this.authorizeConsumer();
      }

    // If not embedded, immediately authorize content
    } else {
      this.authorizeConsumer();
    }
  }
/**
  * Launches the provider app and begins the authorization sequence.
  */
Launches the provider app and begins the authorization sequence.
Launches the provider app and begins the authorization sequence .
launch() {
    if (window.self !== window.top) {
      this.JSONRPC.notification('launch');
      if (this.acls.some((x) => x !== '*')) {
        this.JSONRPC.request('authorizeConsumer', [])
          .then(this.authorizeConsumer)
          .catch(this.emitError);
      } else if (this.secret) {
        this.JSONRPC.request('challengeConsumer', [])
          .then(this.verifyChallenge)
          .catch(this.emitError);
      } else {
        this.authorizeConsumer();
      }
    } else {
      this.authorizeConsumer();
    }
  }
launch ( ) { if ( window . self !== window . top ) { this . JSONRPC . notification ( 'launch' ) ; if ( this . acls . some ( ( x ) => x !== '*' ) ) { this . JSONRPC . request ( 'authorizeConsumer' , [ ] ) . then ( this . authorizeConsumer ) . catch ( this . emitError ) ; } else if ( this . secret ) { this . JSONRPC . request ( 'challengeConsumer' , [ ] ) . then ( this . verifyChallenge ) . catch ( this . emitError ) ; } else { this . authorizeConsumer ( ) ; } } else { this . authorizeConsumer ( ) ; } }
Launches the provider app and begins the authorization sequence.
Launches the provider app and begins the authorization sequence .
// Begin launch and authorization sequence // We have a specific origin to trust (excluding wildcard *), // wait for response to authorize. // We don't know who to trust, challenge parent for secret // acl is '*' and there is no secret, immediately authorize content // If not embedded, immediately authorize content