示例#1
0
 function showPage()
 {
     if ($this->minimal) {
         // Even more minimal -- we're in a machine API
         // and don't want to flood the output.
         $this->extraHeaders();
         $this->showContent();
     } else {
         parent::showPage();
     }
     // We don't want to have any more output after this
     exit;
 }
 function showAuthorized()
 {
     $title = null;
     $msg = null;
     if ($this->app->name == 'anonymous') {
         $title = _('You have successfully authorized the application');
         $msg = _('Please return to the application and enter the following security code to complete the process.');
     } else {
         $title = sprintf(_('You have successfully authorized %s'), $this->app->name);
         $msg = sprintf(_('Please return to %s and enter the following security code to complete the process.'), $this->app->name);
     }
     if ($this->reqToken->verified_callback == 'oob') {
         $pin = new ApiOauthPinAction($title, $msg, $this->reqToken->verifier, $this->desktopMode());
         $pin->showPage();
     } else {
         // NOTE: This would only happen if an application registered as
         // a web application but sent in 'oob' for the oauth_callback
         // parameter. Usually web apps will send in a callback and
         // not use the pin-based workflow.
         $info = new InfoAction($title, $msg, $this->oauthTokenParam, $this->reqToken->verifier);
         $info->showPage();
     }
 }