| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <!DOCTYPE html>
- <html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
- <title th:text="#{cas.mfa.u2f.pagetitle}">U2f Login View</title>
- <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
- <script th:src="@{/js/u2f/u2f-api.js}"></script>
- <script th:inline="javascript">
- /*<![CDATA[*/
- var appId = /*[[${u2fAuth.appId}]]*/;
- var version = /*[[${u2fAuth.version}]]*/;
- var challenge = /*[[${u2fAuth.challenge}]]*/;
- var keyHandle = /*[[${u2fAuth.keyHandle}]]*/;
- setTimeout(function () {
- var registeredKeys = [{version: version, keyHandle: keyHandle}];
- u2f.sign(appId, challenge, registeredKeys, function (data) {
- var form = document.getElementById('form');
- var reg = document.getElementById('tokenResponse');
- reg.value = JSON.stringify(data);
- form.submit();
- });
- }, 1000);
- /*]]>*/
- </script>
- </head>
- <body>
- <main role="main" class="container mt-3 mb-3">
- <div layout:fragment="content" id="login">
- <div class="alert alert-info">
- <h3 th:text="#{cas.mfa.u2f.authentication.device}">Authenticate Device</h3>
- <div th:utext="#{cas.mfa.u2f.authentication.message}">
- <p><strong>Please touch the flashing U2F device now.</strong></p>
- <p> You may be prompted to allow the site permission to access your security keys. After granting
- permission, the device will start to blink.</p>
- </div>
- <form method="POST" id="form" th:object="${credential}" th:action="@{/login}">
- <input type="hidden" name="tokenResponse" id="tokenResponse" th:field="*{token}"/>
- <input type="hidden" name="_eventId" value="submit"/>
- <input type="hidden" name="execution" th:value="${flowExecutionKey}"/>
- <input type="hidden" name="geolocation"/>
- </form>
- </div>
- </div>
- </main>
- </body>
- </html>
|