function login()

in salesforce/canvas/public/javascripts/canvas-all.js [696:721]


    function login(ctx) {
      var uri;
      ctx = ctx || {};
      uri = ctx.uri || '/rest/oauth2';
      ctx.params = ctx.params || { state: '' };
      ctx.params.state =
        ctx.params.state || ctx.callback || window.location.pathname;
      ctx.params.display = ctx.params.display || 'popup';
      ctx.params.redirect_uri = $$.startsWithHttp(
        ctx.params.redirect_uri,
        encodeURIComponent(
          window.location.protocol +
            '//' +
            window.location.hostname +
            ':' +
            window.location.port
        ) + ctx.params.redirect_uri
      );
      uri = uri + query(ctx.params);
      console.log('LOGIN URI IS', uri);
      childWindow = window.open(
        uri,
        'OAuth',
        'status=0,toolbar=0,menubar=0,resizable=0,scrollbars=1,top=50,left=50,height=500,width=680'
      );
    }