| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| http://www.apache.org/licenses/LICENSE-2.0 |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <!DOCTYPE html> |
| <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]--> |
| <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]--> |
| <!--[if IE 8]><html class="no-js lt-ie9"><![endif]--> |
| <!--[if gt IE 8]><!--> |
| <html class="no-js"> |
| <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <title>Token Generation</title> |
| <meta name="description" content=""> |
| <meta name="viewport" content="width=device-width"> |
| |
| <link rel="shortcut icon" href="images/favicon.ico"> |
| <link href="styles/bootstrap.min.css" media="all" rel="stylesheet" type="text/css" id="bootstrap-css"> |
| <link href="styles/knox.css" media="all" rel="stylesheet" type="text/css"> |
| |
| <script src="libs/bower/jquery/js/jquery-3.5.1.min.js" ></script> |
| <script type="text/javascript" src="js/tokengen.js"></script> |
| |
| <script type="text/javascript"> |
| $(function() { |
| var updateBoxPosition = function() { |
| $('#signin-container').css({ |
| 'margin-top' : ($(window).height() - $('#signin-container').height()) / 2 |
| }); |
| }; |
| $(window).resize(updateBoxPosition); |
| setTimeout(updateBoxPosition, 50); |
| }); |
| </script> |
| |
| </head> |
| <body class="login" style=""> |
| <!-- Page content |
| ================================================== --> |
| <section id="signin-container" style="margin-top: 4.5px;"> |
| <form action="" method="get" accept-charset="utf-8"> |
| <fieldset> |
| <div class="fields"> |
| <h3>Token Generation</h3> |
| <label><i class="icon-info"></i> Token Generation enables integration and API invocations by using the |
| token as an authorization bearer token. Copy the JWT token from the resulting text area and protect it |
| securely from others as this token represents your identity and is active until expired.</label> |
| <!-- |
| <label><i class="icon-comment"></i> Comment:</label> |
| <input type="text" name="comment" id="comment" tabindex="1" onkeypress=keypressed(event) autofocus> |
| --> |
| <label><i class="icon-time"></i> Lifetime (days):</label> |
| <select name="lifespan" id="lifespan" tabindex="1" onkeypress=keypressed(event)> |
| <option value="1">1</option> |
| <option value="2">2</option> |
| <option value="3">3</option> |
| <option value="4">4</option> |
| <option value="5">5</option> |
| <option value="6">6</option> |
| <option value="7">7</option> |
| </select> |
| </div> |
| <span id="errorBox" class="help-inline" style="color:white;display:none;"><span class="errorMsg"></span> |
| <i class="icon-warning-sign" style="color:#ae2817;"></i> |
| </span> |
| <button type="button" class="btn btn-primary btn-block" id="genToken" tabindex="2" onkeypress="keypressed(event)" onclick="gen();"> |
| Generate Token |
| </button> |
| </fieldset> |
| </form> |
| </section> |
| <section id="signin-container" style="margin-top: 4.5px;"> |
| <span id="resultBox" class="help-inline" style="color:black;display:none;"> |
| <label><i class="icon-copy"></i> JWT Token:</label> |
| <textarea id="accessToken" name="accessToken" rows="5" cols="80"></textarea> |
| <label><i class="icon-copy"></i> Passcode Token:</label> |
| <textarea id="accessPasscode" name="accessPasscode" rows="1" cols="80"></textarea> |
| <label><i class="icon-info"></i> Expiration:</label> |
| <span id="expiry" name="expiry"><i style="color:#000000;"></i></span> |
| <label><i class="icon-info"></i> User:</label> |
| <span id="user" name="user"><i style="color:#000000;"></i></span> |
| <label><i class="icon-link"></i> Homepage:</label> |
| <div id="homepage_url" name="homepage_url"><i style="color:#000000;"></i></div> |
| <label><i class="icon-info"></i> Target URL:</label> |
| <div id="target_url" name="target_url"><i style="color:#000000;"></i></div> |
| </span> |
| </section> |
| </body> |
| </html> |