access-denied-redirect.php
1 year ago
admin-toolbar.php
1 year ago
api-route.php
1 year ago
backend-menu.php
1 year ago
capability.php
1 year ago
content.php
1 year ago
identity.php
1 year ago
jwt.php
5 months ago
login-redirect.php
1 year ago
logout-redirect.php
1 year ago
metabox.php
1 year ago
not-found-redirect.php
1 year ago
policy.php
1 year ago
url.php
1 year ago
welcome.php
1 year ago
widget.php
1 year ago
jwt.php
139 lines
| 1 | <?php /** @version 7.1.0 **/ ?> |
| 2 | |
| 3 | <?php if (defined('AAM_KEY')) { ?> |
| 4 | <div class="aam-feature" id="jwt-content"> |
| 5 | <div class="row"> |
| 6 | <div class="col-xs-12"> |
| 7 | <table id="jwt-list" class="table table-striped table-bordered"> |
| 8 | <thead> |
| 9 | <tr> |
| 10 | <th>ID</th> |
| 11 | <th>Token</th> |
| 12 | <th>URL</th> |
| 13 | <th width="8%"> </th> |
| 14 | <th width="70%"><?php echo __('ID/Status', 'advanced-access-manager'); ?></th> |
| 15 | <th><?php echo __('Actions', 'advanced-access-manager'); ?></th> |
| 16 | <th>Description</th> |
| 17 | </tr> |
| 18 | </thead> |
| 19 | <tbody></tbody> |
| 20 | </table> |
| 21 | </div> |
| 22 | </div> |
| 23 | |
| 24 | <div class="modal fade" id="create-jwt-modal" tabindex="-1" role="dialog"> |
| 25 | <div class="modal-dialog" role="document"> |
| 26 | <div class="modal-content"> |
| 27 | <div class="modal-header"> |
| 28 | <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">×</span></button> |
| 29 | <h4 class="modal-title"><?php echo __('Create JWT Token', 'advanced-access-manager'); ?></h4> |
| 30 | </div> |
| 31 | <div class="modal-body"> |
| 32 | <div class="form-group aam-bordered"> |
| 33 | <label for="jwt-expiration-datapicker" class="aam-block"> |
| 34 | <?php echo __('JWT Expires', 'advanced-access-manager'); ?> |
| 35 | </label> |
| 36 | <div id="jwt-expiration-datapicker"></div> |
| 37 | <input type="hidden" id="jwt-expires" /> |
| 38 | </div> |
| 39 | |
| 40 | <table class="table table-bordered"> |
| 41 | <tbody> |
| 42 | <tr> |
| 43 | <td> |
| 44 | <span class='aam-setting-title'><?php echo __('Is token refreshable?', 'advanced-access-manager'); ?></span> |
| 45 | <p class="aam-setting-description"> |
| 46 | <?php echo __('Whether this token, before expires, can be used to obtain a new token for the same time duration or not.', 'advanced-access-manager'); ?> |
| 47 | </p> |
| 48 | </td> |
| 49 | <td class="text-center"> |
| 50 | <input data-toggle="toggle" id="jwt-refreshable" type="checkbox" data-on="Yes" data-off="No" data-size="small" /> |
| 51 | </td> |
| 52 | </tr> |
| 53 | </tbody> |
| 54 | </table> |
| 55 | |
| 56 | <div class="form-group jwt-claims-container"> |
| 57 | <label for="aam-jwt-token-description" class="aam-block"> |
| 58 | <?php echo __('Token Description (Optional)', 'advanced-access-manager'); ?> |
| 59 | </label> |
| 60 | <textarea |
| 61 | id="aam-jwt-token-description" |
| 62 | style="border: 1px solid #CCCCCC; width: 100%" |
| 63 | rows="2" |
| 64 | ></textarea> |
| 65 | </div> |
| 66 | |
| 67 | <div class="form-group jwt-claims-container"> |
| 68 | <label for="aam-jwt-claims-editor" class="aam-block"> |
| 69 | <?php echo __('JWT Additional Claims (Optional)', 'advanced-access-manager'); ?> |
| 70 | </label> |
| 71 | <textarea |
| 72 | id="aam-jwt-claims-editor" |
| 73 | style="border: 1px solid #CCCCCC; width: 100%" |
| 74 | rows="3" |
| 75 | ></textarea> |
| 76 | <small><?php echo __('Additional claims to include in the token.', 'advanced-access-manager'); ?></small> |
| 77 | </div> |
| 78 | </div> |
| 79 | <div class="modal-footer"> |
| 80 | <button type="button" class="btn btn-success" id="create-jwt-btn"><?php echo __('Create', 'advanced-access-manager'); ?></button> |
| 81 | <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', 'advanced-access-manager'); ?></button> |
| 82 | </div> |
| 83 | </div> |
| 84 | </div> |
| 85 | </div> |
| 86 | |
| 87 | <div class="modal fade" id="view-jwt-modal" tabindex="-1" role="dialog"> |
| 88 | <div class="modal-dialog" role="document"> |
| 89 | <div class="modal-content"> |
| 90 | <div class="modal-header"> |
| 91 | <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">×</span></button> |
| 92 | <h4 class="modal-title"><?php echo __('View JWT Token', 'advanced-access-manager'); ?></h4> |
| 93 | </div> |
| 94 | <div class="modal-body"> |
| 95 | <div class="form-group"> |
| 96 | <label for="view-jwt-token" class="aam-block"> |
| 97 | <?php echo __('JWT Token (for API request)', 'advanced-access-manager'); ?> |
| 98 | <a href="#" class="aam-copy-clipboard" data-clipboard-target="#view-jwt-token"><?php echo __('Copy to clipboard', 'advanced-access-manager'); ?></a> |
| 99 | </label> |
| 100 | <textarea class="form-control" id="view-jwt-token" readonly rows="5"></textarea> |
| 101 | </div> |
| 102 | |
| 103 | <hr/> |
| 104 | |
| 105 | <div class="form-group" id="jwt-passwordless-url-container"> |
| 106 | <label for="view-jwt-url" class="aam-block"> |
| 107 | <?php echo __('Passwordless Login URL (with JWT token)', 'advanced-access-manager'); ?> |
| 108 | <a href="#" class="aam-copy-clipboard" data-clipboard-target="#view-jwt-url"><?php echo __('Copy to clipboard', 'advanced-access-manager'); ?></a> |
| 109 | </label> |
| 110 | <textarea class="form-control" id="view-jwt-url" readonly rows="5"></textarea> |
| 111 | <small><?php echo __('Use this URL to authenticate account without the need to enter username/password.', 'advanced-access-manager'); ?></small> |
| 112 | </div> |
| 113 | </div> |
| 114 | <div class="modal-footer"> |
| 115 | <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', 'advanced-access-manager'); ?></button> |
| 116 | </div> |
| 117 | </div> |
| 118 | </div> |
| 119 | </div> |
| 120 | |
| 121 | <div class="modal fade" id="delete-jwt-modal" tabindex="-1" role="dialog"> |
| 122 | <div class="modal-dialog" role="document"> |
| 123 | <div class="modal-content"> |
| 124 | <div class="modal-header"> |
| 125 | <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo __('Close', 'advanced-access-manager'); ?>"><span aria-hidden="true">×</span></button> |
| 126 | <h4 class="modal-title"><?php echo __('Delete JWT Token', 'advanced-access-manager'); ?></h4> |
| 127 | </div> |
| 128 | <div class="modal-body"> |
| 129 | <p class="alert alert-danger text-larger"><?php echo __('You are about to delete already issued JWT token. Any application or user that has this token, will no longer be able to use it. Please confirm.', 'advanced-access-manager') ?></p> |
| 130 | </div> |
| 131 | <div class="modal-footer"> |
| 132 | <button type="button" class="btn btn-danger" id="jwt-delete-btn"><?php echo __('Delete', 'advanced-access-manager'); ?></button> |
| 133 | <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo __('Close', 'advanced-access-manager'); ?></button> |
| 134 | </div> |
| 135 | </div> |
| 136 | </div> |
| 137 | </div> |
| 138 | </div> |
| 139 | <?php } |