Exemplo n.º 1
0
 public function index(Request $request)
 {
     $credential = $this->credentialStore->findByEmail($this->user->email);
     $gmailWatch = $this->watchStore->findByEmailAndService($this->user->email, 'gmail');
     if ($gmailWatch) {
         $gmailWatchExpiration = $gmailWatch->expiration;
     } else {
         $gmailWatchExpiration = null;
     }
     return view('dashboard', ['isDev' => $this->app->isDev(), 'user' => $this->user, 'logoutUrl' => UserService::createLogoutURL('/'), 'authorized' => isset($credential), 'watchingGmail' => isset($gmailWatch), 'gmailWatchExpiration' => $gmailWatchExpiration, 'message' => $request->session()->get('message')]);
 }
Exemplo n.º 2
0
  <input type="submit" style="display: none" />
</form>

<p id="ajax-status"></p>

<p id="toolbar">
<?php 
$user = UserService::getCurrentUser();
if ($user) {
    ?>
  <span class="username"><?php 
    echo $user->getNickname();
    ?>
</span>
  <a href="<?php 
    echo UserService::createLogoutURL('', "google.com");
    ?>
">log out</a>
<?php 
} else {
    ?>
  <a href="<?php 
    echo UserService::createLoginURL('');
    ?>
">log in</a>
<?php 
}
?>
 | <a href="reset.do">Reset Session</a>
 | Shift-Enter for newline
 | Ctrl-Up/Down for history
Exemplo n.º 3
0
 public function testCreateLogoutOtherApplicationError()
 {
     $req = new \google\appengine\CreateLogoutURLRequest();
     $req->setDestinationUrl('http://abc');
     $exception = new \google\appengine\runtime\ApplicationError(123, 'yyy');
     $this->setExpectedException('\\google\\appengine\\runtime\\ApplicationError', 'yyy');
     $this->apiProxyMock->expectCall('user', 'CreateLogoutURL', $req, $exception);
     UserService::createLogoutURL('http://abc');
 }