@**
 * Copyright (c) 2012 Kaj Magnus Lindberg
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *@

@(origNonceBack: String, weakSessionId: String)

<!DOCTYPE html>
<html>
<head>
@* [script_src_self] *@
<script type='text/javascript'>
  window.opener.debiki.internal.handleLoginResponse({@* [login_cont_in_opnr] *@
    @* Typescript interface: LoginPopupLoginResponse  *@
    origNonceBack: '@origNonceBack',
    weakSessionId: '@weakSessionId',  // [NOCOOKIES]
    status: 'LoginOk'
  });
  window.close();
</script>
</head>
<body>
<!-- views/authn/sendAuthnResultToOpenerCloseCurWin.scala.html -->
@* If the text below appears, something is amiss — instead, we're supposed
 to be in a login popup win now, and we tried to close it, see above, and
 continue in the opener instead.

 But if that didn't work (then there's a bug), let's show a link to the homepage,
 so as not to leave anyone stranded.  (But don't bother translating, 0I18N.)
 *@
<p class="e_AlreadyLoggedIn">
  You have been logged in, welcome!
</p>
<p>
  <a href="/">Go to start page</a>
</p>
</body>
</html>

