├── .babelrc ├── .editorconfig ├── .gitignore ├── LICENSE ├── README.md ├── _locales ├── da │ └── messages.json ├── en │ └── messages.json ├── es-419 │ └── messages.json ├── es │ └── messages.json ├── fr │ └── messages.json ├── hi │ └── messages.json ├── ja │ └── messages.json └── sv │ └── messages.json ├── assets ├── css │ ├── font-awesome.min.css │ ├── fonts.css │ └── reset.css ├── fonts │ ├── FontAwesome.otf │ ├── Roboto-500 │ │ ├── LICENSE.txt │ │ ├── Roboto-500.eot │ │ ├── Roboto-500.svg │ │ ├── Roboto-500.ttf │ │ ├── Roboto-500.woff │ │ └── Roboto-500.woff2 │ ├── Roboto-700 │ │ ├── LICENSE.txt │ │ ├── Roboto-700.eot │ │ ├── Roboto-700.svg │ │ ├── Roboto-700.ttf │ │ ├── Roboto-700.woff │ │ └── Roboto-700.woff2 │ ├── Roboto-regular │ │ ├── LICENSE.txt │ │ ├── Roboto-regular.eot │ │ ├── Roboto-regular.svg │ │ ├── Roboto-regular.ttf │ │ ├── Roboto-regular.woff │ │ └── Roboto-regular.woff2 │ ├── Source-Code-Pro-regular │ │ ├── LICENSE.txt │ │ ├── Source-Code-Pro-regular.eot │ │ ├── Source-Code-Pro-regular.svg │ │ ├── Source-Code-Pro-regular.ttf │ │ ├── Source-Code-Pro-regular.woff │ │ └── Source-Code-Pro-regular.woff2 │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 ├── images │ ├── debug.jpg │ ├── icon-128.png │ ├── icon-16.png │ └── icon-48.png └── js │ ├── console-jwt.js │ ├── content-script.js │ ├── react-15.0.1.min.js │ └── react-dom-15.0.1.min.js ├── manifest.json ├── package.json ├── src ├── css │ ├── dev-tools-jwt-detail-panel.less │ ├── dev-tools-panel-debug-view.less │ ├── dev-tools-panel-view.less │ ├── dev-tools-request-detail-panel.less │ ├── main.less │ ├── popup-debug-view.less │ ├── popup-jwt-detail-view.less │ ├── popup-overview-view.less │ ├── popup-view.less │ ├── stormpath-credits.less │ ├── tab.less │ └── view-jwt-view.less ├── html │ ├── Background.html │ ├── Background.js │ ├── DevTools.html │ ├── DevTools.js │ ├── DevToolsPanel.html │ ├── DevToolsPanel.js │ ├── Popup.html │ ├── Popup.js │ ├── ViewJwt.html │ └── ViewJwt.js └── js │ ├── app │ ├── BackgroundApp.js │ ├── DevToolsApp.js │ └── index.js │ ├── backgroundApi.js │ ├── component │ ├── Checkbox.js │ ├── ContentEditable.js │ ├── Draggable.js │ ├── ExpandableSection.js │ ├── JwtDetail.js │ ├── JwtTextArea.js │ ├── SplitPane.js │ ├── Tab.js │ └── Table.js │ ├── core │ ├── CookieJwtDiscoverer.js │ ├── DomainStore.js │ ├── MessageBus.js │ ├── MessagingService.js │ ├── RequestJwtDiscoverer.js │ ├── RequestListener.js │ ├── StorageJwtDiscoverer.js │ └── Store.js │ ├── index.js │ ├── utils.js │ └── view │ ├── DevToolsJwtDetailPanel.js │ ├── DevToolsPanelCookieView.js │ ├── DevToolsPanelDebugView.js │ ├── DevToolsPanelRequestView.js │ ├── DevToolsPanelStorageView.js │ ├── DevToolsPanelView.js │ ├── DevToolsRequestDetailPanel.js │ ├── PopupDebugView.js │ ├── PopupJwtDetailView.js │ ├── PopupOverviewView.js │ ├── PopupView.js │ ├── StormpathCredits.js │ ├── ViewJwtView.js │ └── index.js ├── test └── website │ ├── app.js │ ├── js │ ├── jquery-2.2.3.min.js │ └── main.js │ └── package.json └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "es2015", 4 | "react", 5 | "stage-0" 6 | ], 7 | "plugins": [ 8 | [ 9 | "transform-decorators-legacy" 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | 9 | [*.{js,html,css}] 10 | indent_style = space 11 | indent_size = 2 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | 15 | [*.md] 16 | indent_size = 4 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | node_modules 28 | 29 | # Optional npm cache directory 30 | .npm 31 | 32 | # Optional REPL history 33 | .node_repl_history 34 | 35 | # Ignore build files 36 | build/* 37 | 38 | # OSX .DS_Store files 39 | .DS_Store 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2017 Stormpath 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | Contact GitHub API Training Shop Blog About 204 | © 2017 GitHub, Inc. Terms Privacy Security Status Help 205 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #Stormpath is Joining Okta 2 | We are incredibly excited to announce that [Stormpath is joining forces with Okta](https://stormpath.com/blog/stormpaths-new-path?utm_source=github&utm_medium=readme&utm-campaign=okta-announcement). Please visit [the Migration FAQs](https://stormpath.com/oktaplusstormpath?utm_source=github&utm_medium=readme&utm-campaign=okta-announcement) for a detailed look at what this means for Stormpath users. 3 | 4 | We're available to answer all questions at [support@stormpath.com](mailto:support@stormpath.com). 5 | 6 | JWT Inspector 7 | ============= 8 | 9 | JWT Inspector is a Chrome extension that lets you inspect JSON Web Tokens in requests, cookies and local storage. 10 | Also debug any JWT directly from the console or in the built-in UI. 11 | 12 | http://www.jwtinspector.io/ 13 | 14 | ## How to build 15 | 16 | Run the command below, then upload the file `./build/jwt-inspector.zip` to the Chrome Web Store. 17 | 18 | ```term 19 | $ npm run build 20 | ``` 21 | 22 | ## How to load in Chrome 23 | 24 | Open up Chrome and navigate to [the extensions page](chrome://extensions/). 25 | Click the [Load unpacked extension...] button and navigate to your project directory, and click [open]. 26 | 27 | ## How to develop 28 | 29 | First load the extension into Chrome (step above) then run the command below to automatically 30 | rebuild the extension on every change. 31 | 32 | ```term 33 | $ npm run dev 34 | ``` 35 | 36 | ## How to test 37 | 38 | Currently testing is done manually by using a test page. Follow the instructions below to launch the test page. 39 | 40 | ```term 41 | $ cd ./test/website/ 42 | $ npm install 43 | $ open http://localhost:5000/ && node app.js 44 | ``` 45 | 46 | ## Copyright 47 | 48 | Copyright © 2016 Stormpath, Inc. All rights reserved. 49 | -------------------------------------------------------------------------------- /_locales/da/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "JWT Inspector - Undersøg JWTs In-browser", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "JWT Inspector kan du inspicere JSON Web poletter i anmodninger, cookies og lokal lagring.", 8 | "description": "The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "JWT Analyzer & Inspector", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "JWT Inspector lets you inspect JSON Web Tokens in requests, cookies and local storage.", 8 | "description":"The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /_locales/es-419/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "Inspector JWT - Inspeccionar JWTs en el navegador", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "JWT inspector le permite inspeccionar web JSON Fichas de solicitudes, las galletas y el almacenamiento local.", 8 | "description": "The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /_locales/es/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "Inspector JWT - Inspeccionar JWTs en el navegador", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "JWT inspector le permite inspeccionar web JSON Fichas de solicitudes, las galletas y el almacenamiento local.", 8 | "description": "The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /_locales/fr/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "Inspecteur JWT - Inspecter JWTs dans le navigateur", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "Inspecteur JWT vous permet d'inspecter JSON Web Tokens dans les demandes, les cookies et le stockage local.", 8 | "description":"The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /_locales/hi/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "जेडब्ल्यूटी इंस्पेक्टर - में ब्राउज़र JWTs का निरीक्षण", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "जेडब्ल्यूटी इंस्पेक्टर आप अनुरोधों, कुकीज और स्थानीय भंडारण में JSON वेब टोकन का निरीक्षण कर देता है।", 8 | "description":"The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /_locales/ja/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "JWTインスペクタは - ブラウザ内JWTsを点検します", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "JWTインスペクタを使用すると、リクエスト、クッキーやローカルストレージにJSONのWebトークンを検査することができます。", 8 | "description":"The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /_locales/sv/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "appName": { 3 | "message": "JWT inspektör - Kontrollera JWTs In-Browser", 4 | "description": "The title of the application, displayed in the web store." 5 | }, 6 | "appDesc": { 7 | "message": "JWT Inspector kan du inspektera JSON webb Tokens i begäran, kakor och lokal lagring.", 8 | "description":"The description of the application, displayed in the web store." 9 | } 10 | } -------------------------------------------------------------------------------- /assets/css/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Code Pro'; 3 | font-weight: 400; 4 | font-style: normal; 5 | src: url('/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.eot'); 6 | src: url('/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.eot?#iefix') format('embedded-opentype'), 7 | local('Source Code Pro'), 8 | local('Source-Code-Pro-regular'), 9 | url('/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.woff2') format('woff2'), 10 | url('/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.woff') format('woff'), 11 | url('/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.ttf') format('truetype'), 12 | url('/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.svg#SourceCodePro') format('svg'); 13 | } 14 | 15 | @font-face { 16 | font-family: 'Roboto'; 17 | font-weight: 400; 18 | font-style: normal; 19 | src: url('/fonts/Roboto-regular/Roboto-regular.eot'); 20 | src: url('/fonts/Roboto-regular/Roboto-regular.eot?#iefix') format('embedded-opentype'), 21 | local('Roboto'), 22 | local('Roboto-regular'), 23 | url('/fonts/Roboto-regular/Roboto-regular.woff2') format('woff2'), 24 | url('/fonts/Roboto-regular/Roboto-regular.woff') format('woff'), 25 | url('/fonts/Roboto-regular/Roboto-regular.ttf') format('truetype'), 26 | url('/fonts/Roboto-regular/Roboto-regular.svg#Roboto') format('svg'); 27 | } 28 | 29 | @font-face { 30 | font-family: 'Roboto'; 31 | font-weight: 500; 32 | font-style: normal; 33 | src: url('/fonts/Roboto-500/Roboto-500.eot'); 34 | src: url('/fonts/Roboto-500/Roboto-500.eot?#iefix') format('embedded-opentype'), 35 | local('Roboto Medium'), 36 | local('Roboto-500'), 37 | url('/fonts/Roboto-500/Roboto-500.woff2') format('woff2'), 38 | url('/fonts/Roboto-500/Roboto-500.woff') format('woff'), 39 | url('/fonts/Roboto-500/Roboto-500.ttf') format('truetype'), 40 | url('/fonts/Roboto-500/Roboto-500.svg#Roboto') format('svg'); 41 | } 42 | 43 | @font-face { 44 | font-family: 'Roboto'; 45 | font-weight: 700; 46 | font-style: normal; 47 | src: url('/fonts/Roboto-700/Roboto-700.eot'); 48 | src: url('/fonts/Roboto-700/Roboto-700.eot?#iefix') format('embedded-opentype'), 49 | local('Roboto Bold'), 50 | local('Roboto-700'), 51 | url('/fonts/Roboto-700/Roboto-700.woff2') format('woff2'), 52 | url('/fonts/Roboto-700/Roboto-700.woff') format('woff'), 53 | url('/fonts/Roboto-700/Roboto-700.ttf') format('truetype'), 54 | url('/fonts/Roboto-700/Roboto-700.svg#Roboto') format('svg'); 55 | } 56 | -------------------------------------------------------------------------------- /assets/css/reset.css: -------------------------------------------------------------------------------- 1 | /* 2 | * HTML5 CSS reset. 3 | * Source: http://meyerweb.com/eric/thoughts/2011/01/03/reset-revisited/ 4 | */ 5 | html, body, div, span, applet, object, iframe, 6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 7 | a, abbr, acronym, address, big, cite, code, 8 | del, dfn, em, img, ins, kbd, q, s, samp, 9 | small, strike, strong, sub, sup, tt, var, 10 | b, u, i, center, 11 | dl, dt, dd, ol, ul, li, 12 | fieldset, form, label, legend, 13 | table, caption, tbody, tfoot, thead, tr, th, td, 14 | article, aside, canvas, details, figcaption, figure, 15 | footer, header, hgroup, menu, nav, section, summary, 16 | time, mark, audio, video { 17 | margin: 0; 18 | padding: 0; 19 | border: 0; 20 | outline: 0; 21 | font-size: 100%; 22 | font: inherit; 23 | vertical-align: baseline; 24 | } 25 | /* HTML5 display-role reset for older browsers */ 26 | article, aside, details, figcaption, figure, 27 | footer, header, hgroup, menu, nav, section { 28 | display: block; 29 | } 30 | body { 31 | line-height: 1; 32 | } 33 | ol, ul { 34 | list-style: none; 35 | } 36 | blockquote, q { 37 | quotes: none; 38 | } 39 | blockquote:before, blockquote:after, 40 | q:before, q:after { 41 | content: ''; 42 | content: none; 43 | } 44 | 45 | /* remember to define visible focus styles! 46 | :focus { 47 | outline: ?????; 48 | } */ 49 | 50 | /* remember to highlight inserts somehow! */ 51 | ins { 52 | text-decoration: none; 53 | } 54 | del { 55 | text-decoration: line-through; 56 | } 57 | 58 | table { 59 | border-collapse: collapse; 60 | border-spacing: 0; 61 | } 62 | -------------------------------------------------------------------------------- /assets/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /assets/fonts/Roboto-500/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /assets/fonts/Roboto-500/Roboto-500.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-500/Roboto-500.eot -------------------------------------------------------------------------------- /assets/fonts/Roboto-500/Roboto-500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-500/Roboto-500.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-500/Roboto-500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-500/Roboto-500.woff -------------------------------------------------------------------------------- /assets/fonts/Roboto-500/Roboto-500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-500/Roboto-500.woff2 -------------------------------------------------------------------------------- /assets/fonts/Roboto-700/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /assets/fonts/Roboto-700/Roboto-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-700/Roboto-700.eot -------------------------------------------------------------------------------- /assets/fonts/Roboto-700/Roboto-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-700/Roboto-700.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-700/Roboto-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-700/Roboto-700.woff -------------------------------------------------------------------------------- /assets/fonts/Roboto-700/Roboto-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-700/Roboto-700.woff2 -------------------------------------------------------------------------------- /assets/fonts/Roboto-regular/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /assets/fonts/Roboto-regular/Roboto-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-regular/Roboto-regular.eot -------------------------------------------------------------------------------- /assets/fonts/Roboto-regular/Roboto-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-regular/Roboto-regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-regular/Roboto-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-regular/Roboto-regular.woff -------------------------------------------------------------------------------- /assets/fonts/Roboto-regular/Roboto-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Roboto-regular/Roboto-regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/Source-Code-Pro-regular/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | 5 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.eot -------------------------------------------------------------------------------- /assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.woff -------------------------------------------------------------------------------- /assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/Source-Code-Pro-regular/Source-Code-Pro-regular.woff2 -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /assets/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /assets/images/debug.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/images/debug.jpg -------------------------------------------------------------------------------- /assets/images/icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/images/icon-128.png -------------------------------------------------------------------------------- /assets/images/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/images/icon-16.png -------------------------------------------------------------------------------- /assets/images/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stormpath/jwt-inspector/2536f322954e038721bc35dcb0fb2379b4a6d91c/assets/images/icon-48.png -------------------------------------------------------------------------------- /assets/js/console-jwt.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Used to extend console with a console.jwt() function. 4 | 5 | (function () { 6 | var jwtExpression = /^[a-zA-Z0-9+/\-_=]+\.[a-zA-Z0-9+/\-_=]+\.[a-zA-Z0-9+/\-_=]+$/; 7 | 8 | function JWT(header, body, signature) { 9 | this.header = header; 10 | this.body = body; 11 | this.signature = signature; 12 | } 13 | 14 | function parseJwt(value, skipValidate) { 15 | if (!value || value.match(jwtExpression) === null) { 16 | return false; 17 | } 18 | 19 | var [header, body, signature] = value.split('.'); 20 | 21 | try { 22 | return new JWT( 23 | JSON.parse(atob(header)), 24 | JSON.parse(atob(body)), 25 | signature 26 | ); 27 | } catch (err) { 28 | return false; 29 | } 30 | } 31 | 32 | if (!window.console.jwt) { 33 | window.console.jwt = function consoleJwt() { 34 | var args = [].slice.call(arguments); 35 | var value = args.pop(); 36 | var parsedJwt = parseJwt(value); 37 | 38 | if (!parsedJwt) { 39 | return console.error('console.jwt: ' + value + ' is not a valid JWT.'); 40 | } 41 | 42 | args.push(parsedJwt); 43 | 44 | console.log.apply(this, args); 45 | }; 46 | } 47 | })(); 48 | -------------------------------------------------------------------------------- /assets/js/content-script.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This content script is in an isolated scope. 4 | // The code below allows us to inject a script into the document so that we gain access to the window. 5 | // This script injected needs to be whitelisted in web_accessible_resources. 6 | 7 | (function () { 8 | var scriptElement = document.createElement('script'); 9 | 10 | scriptElement.src = chrome.extension.getURL('/assets/js/console-jwt.js'); 11 | 12 | scriptElement.onload = function () { 13 | this.parentNode.removeChild(this); 14 | }; 15 | 16 | (document.head || document.documentElement).appendChild(scriptElement); 17 | })(); 18 | -------------------------------------------------------------------------------- /assets/js/react-dom-15.0.1.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ReactDOM v15.0.1 3 | * 4 | * Copyright 2013-present, Facebook, Inc. 5 | * All rights reserved. 6 | * 7 | * This source code is licensed under the BSD-style license found in the 8 | * LICENSE file in the root directory of this source tree. An additional grant 9 | * of patent rights can be found in the PATENTS file in the same directory. 10 | * 11 | */ 12 | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e(require("react"));else if("function"==typeof define&&define.amd)define(["react"],e);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,f.ReactDOM=e(f.React)}}(function(e){return e.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED}); -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "version": "1.0.2", 4 | "minimum_chrome_version": "39", 5 | "default_locale": "en", 6 | "name": "__MSG_appName__", 7 | "short_name":"JWTInspector", 8 | "description": "__MSG_appDesc__", 9 | "icons": { 10 | "16": "assets/images/icon-16.png", 11 | "48": "assets/images/icon-48.png", 12 | "128": "assets/images/icon-128.png" 13 | }, 14 | "background": { 15 | "page": "build/html/Background.html" 16 | }, 17 | "browser_action": { 18 | "default_icon": "assets/images/icon-128.png", 19 | "default_popup": "build/html/Popup.html" 20 | }, 21 | "devtools_page": "build/html/DevTools.html", 22 | "content_scripts": [{ 23 | "all_frames": true, 24 | "run_at": "document_start", 25 | "matches": ["*://*/*"], 26 | "js": ["assets/js/content-script.js"] 27 | }], 28 | "web_accessible_resources":[ 29 | "/assets/js/console-jwt.js" 30 | ], 31 | "permissions": [ 32 | "", 33 | "activeTab", 34 | "clipboardRead", 35 | "contextMenus", 36 | "cookies", 37 | "http://*/*", 38 | "https://*/*", 39 | "storage", 40 | "tabs", 41 | "unlimitedStorage", 42 | "webNavigation", 43 | "webRequest" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.1", 3 | "name": "jwt-inspector", 4 | "homepage": "https://github.com/stormpath/jwt-inspector/", 5 | "author": "Stormpath, 2016", 6 | "license": "LicenseRef-LICENSE", 7 | "scripts": { 8 | "build": "rm -rf ./build/ && mkdir ./build/ && cp -r ./src/* ./build && rm -rf ./build/js/ ./build/css/ && webpack && npm run pack", 9 | "dev": "rm -rf ./build/ && mkdir ./build/ && cp -r ./src/* ./build && rm -rf ./build/js/ ./build/css/ && webpack --watch", 10 | "pack": "zip -r ./build/jwt-inspector.zip . -x *.git* *.DS_Store* .* webpack.config.js package.json README.md \"node_modules/*\" \"test/*\" \"src/*\"" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/stormpath/jwt-inspector.git" 15 | }, 16 | "bugs": { 17 | "url": "https://github.com/stormpath/jwt-inspector/issues" 18 | }, 19 | "dependencies": { 20 | "babel-core": "^6.3.26", 21 | "babel-loader": "^6.2.0", 22 | "babel-plugin-transform-decorators-legacy": "^1.3.4", 23 | "babel-preset-es2015": "^6.3.13", 24 | "babel-preset-react": "^6.3.13", 25 | "babel-preset-stage-0": "^6.3.13", 26 | "babel-runtime": "^6.3.19", 27 | "es6-promise": "^3.1.2", 28 | "file-loader": "^0.8.5", 29 | "json-loader": "^0.5.4", 30 | "njwt": "^0.3.0", 31 | "react": "^15.0.1", 32 | "react-contenteditable": "^1.1.0", 33 | "react-dom": "^15.0.1", 34 | "react-textarea-autosize": "^4.0.1", 35 | "webpack": "^1.12.13", 36 | "webpack-dev-middleware": "^1.5.1" 37 | }, 38 | "devDependencies": { 39 | "css-loader": "^0.23.1", 40 | "extract-text-webpack-plugin": "^1.0.1", 41 | "image-webpack-loader": "^1.8.0", 42 | "less": "^2.6.1", 43 | "less-cli": "^1.0.0", 44 | "less-loader": "^2.2.3", 45 | "style-loader": "^0.13.1" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/css/dev-tools-jwt-detail-panel.less: -------------------------------------------------------------------------------- 1 | #dev-tools-jwt-detail-panel { 2 | .sub-menu { 3 | position: relative!important; 4 | top: 0px!important; 5 | z-index: 0!important; 6 | height: 22px!important; 7 | 8 | line-height: 27px!important; 9 | 10 | i { 11 | position: relative; 12 | top: -6px; 13 | } 14 | 15 | .item { 16 | white-space: nowrap; 17 | overflow: hidden; 18 | text-overflow: ellipsis; 19 | max-width: 450px; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/css/dev-tools-panel-debug-view.less: -------------------------------------------------------------------------------- 1 | #dev-tools-panel-debug-view { 2 | position: relative; 3 | font-size: 11px; 4 | top: 27px; 5 | 6 | .content { 7 | display: flex; 8 | } 9 | 10 | .top { 11 | height: 27px; 12 | color: #5a5a5a; 13 | font-weight: 400; 14 | line-height: 13px; 15 | .left, .right { 16 | padding: 7px; 17 | background-color: #f3f3f3; 18 | border-bottom: 1px solid #dedede; 19 | } 20 | } 21 | 22 | .left, .right { 23 | flex: 50%; 24 | } 25 | 26 | .left { 27 | border-right: 1px solid #dedede; 28 | } 29 | 30 | .bottom { 31 | .left { 32 | .jwt-editor { 33 | padding: 10px; 34 | height: 100%; 35 | border: 0px; 36 | margin: 0px; 37 | outline: 0px; 38 | word-break: break-all; 39 | 40 | font-family: "Source Code Pro", monospace; 41 | word-wrap: break-word; 42 | font-size: 12px; 43 | 44 | .separator { 45 | } 46 | 47 | .unknown { 48 | background-color: red; 49 | color: white; 50 | } 51 | 52 | .header { 53 | color: #9b4500; 54 | } 55 | 56 | .payload { 57 | color: #890193; 58 | } 59 | 60 | .signature { 61 | color: #ca0000; 62 | } 63 | } 64 | } 65 | 66 | .right { 67 | .jwt { 68 | color: #5a5a5a; 69 | 70 | .section { 71 | border-bottom: 1px solid #dedede; 72 | font-size: 11px; 73 | padding: 10px; 74 | 75 | .header { 76 | font-weight: 600; 77 | cursor: pointer; 78 | 79 | .fa { 80 | position: relative; 81 | top: -0px; 82 | margin-right: 2px; 83 | } 84 | 85 | .copy { 86 | margin-left: 5px; 87 | font-weight: normal; 88 | 89 | &:hover { 90 | cursor: pointer; 91 | color: #222222; 92 | } 93 | } 94 | } 95 | 96 | .body { 97 | padding-top: 5px; 98 | word-break: break-all; 99 | text-overflow: ellipsis; 100 | font-family: "Source Code Pro", monospace; 101 | } 102 | 103 | .body.plain { 104 | white-space: normal; 105 | } 106 | 107 | .body.json { 108 | white-space: pre; 109 | .token { 110 | &.object_key { 111 | color: #ca0000; 112 | } 113 | } 114 | } 115 | } 116 | 117 | .section:first-child { 118 | margin-top: 0px; 119 | } 120 | 121 | .section:last-child { 122 | border-bottom: 0px; 123 | } 124 | } 125 | 126 | .message { 127 | padding: 10px; 128 | font-size: 16px; 129 | } 130 | 131 | .no-jwt.message { 132 | color: #c0c0c0; 133 | } 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /src/css/dev-tools-panel-view.less: -------------------------------------------------------------------------------- 1 | #dev-tools-panel-view { 2 | .menu { 3 | position: fixed; 4 | z-index: 100000; 5 | top: 0px; 6 | height: 26px; 7 | width: 100%; 8 | background-color: #fff; 9 | border-bottom: 1px solid #dedede; 10 | line-height: 14px; 11 | .badge { 12 | line-height: 9px; 13 | display: inline-block; 14 | background: #979797; 15 | color: white; 16 | border-radius: 11px; 17 | text-align: center; 18 | font-size: 8px; 19 | margin-left: 3px; 20 | padding: 1px 4px; 21 | margin-top: 1px; 22 | vertical-align: top; 23 | } 24 | } 25 | 26 | .icon { 27 | margin-right: 3px; 28 | } 29 | 30 | .divider { 31 | position: relative; 32 | display: inline-block; 33 | background-color: #ccc; 34 | width: 1px; 35 | top: 3px; 36 | height: 13px; 37 | margin-left: 7px; 38 | margin-right: 6px; 39 | } 40 | 41 | .menu, .sub-menu { 42 | -webkit-user-select: none; 43 | } 44 | 45 | table { 46 | width: 100%; 47 | font-size: 11px; 48 | 49 | th, td { 50 | font-weight: 400; 51 | padding: 7px 10px; 52 | padding-bottom: 6px; 53 | height: 26px; 54 | } 55 | 56 | thead { 57 | -webkit-user-select: none; 58 | 59 | tr, th { 60 | width: 100px; 61 | white-space: nowrap; 62 | overflow: hidden; 63 | text-overflow: ellipsis; 64 | } 65 | 66 | th { 67 | border: 1px solid #dadada; 68 | border-top: 0px; 69 | text-align: left; 70 | } 71 | 72 | th:first-child { 73 | border-left: 0px; 74 | } 75 | 76 | th:last-child { 77 | border-right: 0px; 78 | } 79 | } 80 | 81 | tbody { 82 | tr:nth-child(odd) { 83 | background-color: #f5f5f5; 84 | } 85 | 86 | tr.selected { 87 | background-color: #e5e5e5; 88 | } 89 | 90 | tr:hover { 91 | cursor: pointer; 92 | background-color: #dfdfdf; 93 | } 94 | 95 | tr td { 96 | max-width: 1200px; 97 | white-space: nowrap; 98 | overflow: hidden; 99 | text-overflow: ellipsis; 100 | } 101 | 102 | tr.no-data { 103 | cursor: inherit; 104 | pointer-events: none; 105 | background-color: inherit; 106 | color: #c0c0c0; 107 | } 108 | } 109 | } 110 | 111 | .sub-menu { 112 | position: fixed; 113 | z-index: 100000; 114 | top: 27px; 115 | width: 100%; 116 | 117 | color: #5a5a5a; 118 | font-size: 11px; 119 | 120 | margin: 0px; 121 | padding: 2px; 122 | 123 | background-color: #f3f3f3; 124 | border-bottom: 1px solid #dedede; 125 | 126 | height: 22px; 127 | 128 | .item { 129 | line-height: 11px; 130 | margin-left: 5px; 131 | display: inline-block; 132 | 133 | &:first-child { 134 | margin-left: 5px; 135 | } 136 | 137 | &.query { 138 | margin: 0px; 139 | padding: 0px; 140 | height: 26px; 141 | 142 | input { 143 | background-color: #f3f3f4; 144 | margin: 0px; 145 | margin-left: 5px; 146 | padding: 4px; 147 | width: 200px; 148 | border: 0px; 149 | } 150 | 151 | input:focus { 152 | outline: none; 153 | } 154 | } 155 | } 156 | } 157 | 158 | .split-pane { 159 | position: relative; 160 | top: 54px; 161 | width: 100%; 162 | font-size: 11px; 163 | 164 | .left { 165 | overflow: hidden; 166 | } 167 | 168 | .right { 169 | .sub-menu { 170 | height: 22px; 171 | 172 | .close-button { 173 | margin-left: 10px; 174 | position: relative; 175 | 176 | &:hover { 177 | cursor: pointer; 178 | color: #a0a0a0; 179 | } 180 | } 181 | 182 | .item { 183 | margin: 0px; 184 | padding: 5px; 185 | margin: 0px; 186 | color: #5a5a5a; 187 | text-align: left; 188 | } 189 | } 190 | 191 | .content { 192 | overflow: scroll; 193 | 194 | .jwt { 195 | color: #5a5a5a; 196 | 197 | .section { 198 | border-bottom: 1px solid #dedede; 199 | font-size: 11px; 200 | padding: 10px; 201 | 202 | .header { 203 | font-weight: 600; 204 | cursor: pointer; 205 | 206 | .fa { 207 | position: relative; 208 | top: -0px; 209 | margin-right: 2px; 210 | } 211 | 212 | .copy { 213 | margin-left: 5px; 214 | font-weight: normal; 215 | 216 | &:hover { 217 | cursor: pointer; 218 | color: #222222; 219 | } 220 | } 221 | } 222 | 223 | .body { 224 | padding-top: 5px; 225 | word-break: break-all; 226 | text-overflow: ellipsis; 227 | font-family: "Source Code Pro", monospace; 228 | } 229 | 230 | .body.plain { 231 | white-space: normal; 232 | } 233 | 234 | .body.json { 235 | white-space: pre; 236 | .token { 237 | &.object_key { 238 | color: #ca0000; 239 | } 240 | } 241 | } 242 | } 243 | 244 | .section:first-child { 245 | margin-top: 0px; 246 | } 247 | 248 | .section:last-child { 249 | border-bottom: 0px; 250 | } 251 | } 252 | } 253 | } 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /src/css/dev-tools-request-detail-panel.less: -------------------------------------------------------------------------------- 1 | #dev-tools-request-detail-panel { 2 | .sub-menu { 3 | position: relative!important; 4 | top: 0px!important; 5 | z-index: 0!important; 6 | height: 22px!important; 7 | 8 | line-height: 27px!important; 9 | 10 | i { 11 | position: relative; 12 | top: -6px; 13 | } 14 | 15 | .item { 16 | white-space: nowrap; 17 | overflow: hidden; 18 | text-overflow: ellipsis; 19 | max-width: 450px; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/css/main.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Set defaults. 3 | */ 4 | html, body { 5 | padding: 0px; 6 | margin: 0px; 7 | font-family: 'Roboto', sans-serif; 8 | font-size: 11px; 9 | } 10 | 11 | #container { 12 | padding: 0px; 13 | margin: 0px; 14 | } 15 | 16 | #debug { 17 | position: absolute; 18 | z-index: 10000000000; 19 | pointer-events: none; 20 | opacity: 0; 21 | left: 0; 22 | right: 0; 23 | top: 0; 24 | bottom: 0; 25 | width: 200px; 26 | height: 200px; 27 | } 28 | -------------------------------------------------------------------------------- /src/css/popup-debug-view.less: -------------------------------------------------------------------------------- 1 | #popup-debug-view { 2 | font-size: 11px; 3 | 4 | .top { 5 | textarea { 6 | padding: 10px; 7 | width: 100%; 8 | height: 150px; 9 | border: 0px; 10 | font-size: 16px; 11 | margin: 0px; 12 | outline: 0px; 13 | resize: none; 14 | word-break: break-all; 15 | 16 | &.parse-error { 17 | color: red; 18 | } 19 | } 20 | } 21 | 22 | .bottom { 23 | border-top: 1px solid #dedede; 24 | 25 | .jwt { 26 | color: #5a5a5a; 27 | 28 | .section { 29 | border-bottom: 1px solid #dedede; 30 | font-size: 11px; 31 | padding: 10px; 32 | 33 | .header { 34 | font-weight: 600; 35 | cursor: pointer; 36 | 37 | .fa { 38 | position: relative; 39 | top: -0px; 40 | margin-right: 2px; 41 | } 42 | 43 | .copy { 44 | margin-left: 5px; 45 | font-weight: normal; 46 | 47 | &:hover { 48 | cursor: pointer; 49 | color: #222222; 50 | } 51 | } 52 | } 53 | 54 | .body { 55 | padding-top: 5px; 56 | word-break: break-all; 57 | text-overflow: ellipsis; 58 | font-family: "Source Code Pro", monospace; 59 | } 60 | 61 | .body.plain { 62 | white-space: normal; 63 | } 64 | 65 | .body.json { 66 | white-space: pre; 67 | .token { 68 | &.object_key { 69 | color: #ca0000; 70 | } 71 | } 72 | } 73 | } 74 | 75 | .section:first-child { 76 | margin-top: 0px; 77 | } 78 | 79 | .section:last-child { 80 | border-bottom: 0px; 81 | } 82 | } 83 | 84 | .message { 85 | padding: 10px; 86 | font-size: 16px; 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/css/popup-jwt-detail-view.less: -------------------------------------------------------------------------------- 1 | #popup-jwt-detail-view { 2 | font-size: 11px; 3 | 4 | .top { 5 | padding: 5px; 6 | 7 | a, a:hover, a:link { 8 | color: #101010; 9 | text-decoration: none; 10 | } 11 | } 12 | 13 | .bottom { 14 | .jwt { 15 | color: #5a5a5a; 16 | border-top: 1px solid #dedede; 17 | 18 | .section { 19 | border-bottom: 1px solid #dedede; 20 | font-size: 11px; 21 | padding: 10px; 22 | 23 | .header { 24 | font-weight: 600; 25 | cursor: pointer; 26 | 27 | .fa { 28 | position: relative; 29 | top: -0px; 30 | margin-right: 2px; 31 | } 32 | 33 | .copy { 34 | margin-left: 5px; 35 | font-weight: normal; 36 | 37 | &:hover { 38 | cursor: pointer; 39 | color: #222222; 40 | } 41 | } 42 | } 43 | 44 | .body { 45 | padding-top: 5px; 46 | word-break: break-all; 47 | text-overflow: ellipsis; 48 | font-family: "Source Code Pro", monospace; 49 | } 50 | 51 | .body.plain { 52 | white-space: normal; 53 | } 54 | 55 | .body.json { 56 | white-space: pre; 57 | .token { 58 | &.object_key { 59 | color: #ca0000; 60 | } 61 | } 62 | } 63 | } 64 | 65 | .section:first-child { 66 | margin-top: 0px; 67 | } 68 | 69 | .section:last-child { 70 | border-bottom: 0px; 71 | } 72 | } 73 | 74 | .message { 75 | padding: 10px; 76 | font-size: 16px; 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/css/popup-overview-view.less: -------------------------------------------------------------------------------- 1 | #popup-overview-view { 2 | min-height: 185px; 3 | } 4 | -------------------------------------------------------------------------------- /src/css/popup-view.less: -------------------------------------------------------------------------------- 1 | #popup-view { 2 | width: 400px; 3 | 4 | .menu { 5 | height: 26px; 6 | background-color: #fff; 7 | border-bottom: 1px solid #dedede; 8 | .tab { 9 | margin-right: 5px; 10 | } 11 | } 12 | 13 | .icon { 14 | margin-right: 5px; 15 | } 16 | 17 | table { 18 | width: 100%; 19 | font-size: 11px; 20 | 21 | th, td { 22 | height: 26px; 23 | line-height: 16px; 24 | padding: 5px; 25 | } 26 | 27 | thead { 28 | -webkit-user-select: none; 29 | 30 | tr, th { 31 | width: 100px; 32 | white-space: nowrap; 33 | overflow: hidden; 34 | text-overflow: ellipsis; 35 | } 36 | 37 | th { 38 | border: 1px solid #dadada; 39 | border-top: 0px; 40 | text-align: left; 41 | } 42 | 43 | th:first-child { 44 | border-left: 0px; 45 | } 46 | 47 | th:last-child { 48 | border-right: 0px; 49 | } 50 | } 51 | 52 | tbody { 53 | tr:nth-child(odd) { 54 | background-color: #f5f5f5; 55 | } 56 | 57 | tr:hover { 58 | cursor: pointer; 59 | background-color: #dfdfdf; 60 | } 61 | 62 | tr td { 63 | max-width: 1200px; 64 | white-space: nowrap; 65 | overflow: hidden; 66 | text-overflow: ellipsis; 67 | } 68 | 69 | tr.no-data { 70 | cursor: inherit; 71 | pointer-events: none; 72 | background-color: inherit; 73 | color: #c0c0c0; 74 | } 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/css/stormpath-credits.less: -------------------------------------------------------------------------------- 1 | #stormpath-credits { 2 | padding: 5px; 3 | bottom: 0px; 4 | position: fixed; 5 | margin-right: auto; 6 | margin-left: auto; 7 | 8 | a, a:link, a:visited, a:hover { 9 | color: #c0c0c0; 10 | font-size: 11px; 11 | text-decoration: none; 12 | } 13 | 14 | a:hover { 15 | color: #101010; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/css/tab.less: -------------------------------------------------------------------------------- 1 | .tab { 2 | display: inline-block; 3 | 4 | color: #5a5a5a; 5 | 6 | height: 17px; 7 | padding: 7px; 8 | padding-bottom: 2px; 9 | margin-right: 10px; 10 | 11 | font-size: 11px; 12 | text-align: left; 13 | text-shadow: rgba(255, 255, 255, 0.75) 0 1px 0; 14 | white-space: nowrap; 15 | 16 | &:hover { 17 | color: #333; 18 | cursor: pointer; 19 | } 20 | 21 | &.selected { 22 | background-color: #f3f3f3; 23 | border-left: 1px solid #dedede; 24 | border-right: 1px solid #dedede; 25 | border-bottom: 1px solid #f3f3f3; 26 | 27 | &:first-child { 28 | border-left: 0px; 29 | } 30 | } 31 | 32 | &.disabled { 33 | color: #c0c0c0; 34 | pointer-events: none; 35 | cursor: default!important; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/css/view-jwt-view.less: -------------------------------------------------------------------------------- 1 | #view-jwt-view { 2 | #dev-tools-panel-debug-view { 3 | top: 0px!important; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/html/Background.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/html/Background.js: -------------------------------------------------------------------------------- 1 | var backgroundApp = new JwtInspector.BackgroundApp(); 2 | backgroundApp.run(); 3 | -------------------------------------------------------------------------------- /src/html/DevTools.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/html/DevTools.js: -------------------------------------------------------------------------------- 1 | var devToolsApp = new JwtInspector.DevToolsApp(); 2 | devToolsApp.run(); 3 | -------------------------------------------------------------------------------- /src/html/DevToolsPanel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/html/DevToolsPanel.js: -------------------------------------------------------------------------------- 1 | ReactDOM.render( 2 | React.createElement(JwtInspector.DevToolsPanelView), 3 | document.getElementById('container') 4 | ); 5 | -------------------------------------------------------------------------------- /src/html/Popup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/html/Popup.js: -------------------------------------------------------------------------------- 1 | ReactDOM.render( 2 | React.createElement(JwtInspector.PopupView), 3 | document.getElementById('container') 4 | ); 5 | -------------------------------------------------------------------------------- /src/html/ViewJwt.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | View JWT - JWT Inspector 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/html/ViewJwt.js: -------------------------------------------------------------------------------- 1 | ReactDOM.render( 2 | React.createElement(JwtInspector.ViewJwtView), 3 | document.getElementById('container') 4 | ); 5 | -------------------------------------------------------------------------------- /src/js/app/BackgroundApp.js: -------------------------------------------------------------------------------- 1 | import url from 'url'; 2 | import Store from '../core/Store'; 3 | import DomainStore from '../core/DomainStore'; 4 | import MessageBus from '../core/MessageBus'; 5 | import MessagingService from '../core/MessagingService'; 6 | import StorageJwtDiscoverer from '../core/StorageJwtDiscoverer'; 7 | import RequestJwtDiscoverer from '../core/RequestJwtDiscoverer'; 8 | import CookieJwtDiscoverer from '../core/CookieJwtDiscoverer'; 9 | import { isJwt, getAllJwtCookies, getCurrentTab, getTabStorage, endsWith, findJwtsInString, getClipboardText } from '../utils'; 10 | 11 | let matchDomain = (jwt, domain) => jwt.domainRegExp ? domain.match(jwt.domainRegExp) !== null : domain === jwt.domain; 12 | let matchRequestPath = (jwt, path) => jwt.path === path; 13 | 14 | export default class BackgroundApp extends MessagingService { 15 | constructor() { 16 | super(); 17 | this.popupState = {}; 18 | this.mostRecentTabId = null; 19 | this.mostRecentRequestId = 0; 20 | this.preserveLogsForTabs = {}; 21 | this.messageBus = new MessageBus(); 22 | this.jwtCookieStore = new DomainStore(); 23 | this.jwtStorageStore = new DomainStore(); 24 | this.requestItemStore = new Store(); 25 | this.cookieJwtDiscoverer = new CookieJwtDiscoverer(this.jwtCookieStore); 26 | this.requestJwtDiscoverer = new RequestJwtDiscoverer(this.requestItemStore); 27 | this.storageJwtDiscoverer = new StorageJwtDiscoverer(this, this.jwtStorageStore); 28 | } 29 | 30 | _getCurrentTab() { 31 | return getCurrentTab(this.mostRecentTabId); 32 | } 33 | 34 | _getCurrentTabJwts() { 35 | return this._getCurrentTab().then((tab) => { 36 | let parsedUrl = url.parse(tab.url); 37 | 38 | let jwtPromises = [ 39 | this._getCookieJwts().then((jwts) => { 40 | return jwts.filter(x => parsedUrl.hostname.match(x.domainRegExp) !== null && (x.path === '/' || x.path === parsedUrl.path)); 41 | }), 42 | this._getStorageJwts().then((jwts) => { 43 | return jwts.filter(x => parsedUrl.hostname.match(x.domainRegExp) !== null && x.port === parsedUrl.port); 44 | }), 45 | this._getRequestItems().then((jwts) => { 46 | return jwts.filter(x => x.tabId === tab.id && parsedUrl.hostname.match(x.domainRegExp) !== null && parsedUrl.path === url.parse(x.url).path); 47 | }) 48 | ]; 49 | 50 | return Promise.all(jwtPromises).then((results) => { 51 | return { 52 | cookies: results[0], 53 | storage: results[1], 54 | requests: results[2] 55 | }; 56 | }); 57 | }); 58 | } 59 | 60 | _getPopupState() { 61 | return new Promise((accept) => { 62 | accept(this.popupState); 63 | }); 64 | } 65 | 66 | _setPopupState(state) { 67 | return new Promise((accept) => { 68 | for (let key in state) { 69 | this.popupState[key] = state[key]; 70 | } 71 | accept(); 72 | }); 73 | } 74 | 75 | _getCookieJwts() { 76 | return new Promise((accept, reject) => { 77 | accept(this.jwtCookieStore.all()); 78 | }); 79 | } 80 | 81 | _getStorageJwts() { 82 | return new Promise((accept, reject) => { 83 | accept(this.jwtStorageStore.all()); 84 | }); 85 | } 86 | 87 | _getRequestItems() { 88 | return new Promise((accept, reject) => { 89 | accept(this.requestItemStore.all()); 90 | }); 91 | } 92 | 93 | _removeRequestItems(beforeRequestId, tabId) { 94 | return new Promise((accept, reject) => { 95 | accept(this.requestItemStore.remove(x => x.requestId < beforeRequestId && tabId === tabId)); 96 | }); 97 | } 98 | 99 | _setPreserveLog(tabId, state) { 100 | return new Promise((accept) => { 101 | this.preserveLogsForTabs[tabId] = state; 102 | accept(); 103 | }); 104 | } 105 | 106 | _getClipboardJwt() { 107 | return new Promise((accept) => { 108 | let clipboardText = getClipboardText(); 109 | 110 | if (!clipboardText) { 111 | return reject(new Error('Nothing present in clipboard.')); 112 | } 113 | 114 | if (!isJwt(clipboardText)) { 115 | return reject(new Error('Text in clipboard is not a JWT.')); 116 | } 117 | 118 | accept(clipboardText); 119 | }); 120 | } 121 | 122 | run() { 123 | let refreshJwtCountBadge = () => { 124 | this._getCurrentTab().then((tab) => { 125 | let parsedUrl = url.parse(tab.url); 126 | 127 | let jwtRequestItems = this.requestItemStore.find(x => x.tabId === this.mostRecentTabId && x.url === tab.url).slice(-1).pop(); 128 | 129 | let jwtCookieCount = this.jwtCookieStore.count(x => matchDomain(x, parsedUrl.hostname)); 130 | let jwtStorageCount = this.jwtStorageStore.count(x => matchDomain(x, parsedUrl.hostname) && x.port === parsedUrl.port); 131 | let totalJwtCount = jwtCookieCount + jwtStorageCount + (jwtRequestItems ? jwtRequestItems.jwts.length : 0); 132 | 133 | chrome.browserAction.setBadgeText({ 134 | text: totalJwtCount > 0 ? totalJwtCount.toString() : '' 135 | }); 136 | }); 137 | }; 138 | 139 | // When we add/remove JWTs in our store. 140 | // Refresh the badge and notify listeners that the JWTs have been changed. 141 | this.jwtCookieStore.on('changed', () => { 142 | refreshJwtCountBadge(); 143 | this.messageBus.send('jwts', { 144 | action: 'cookies.changed' 145 | }); 146 | }); 147 | 148 | this.jwtStorageStore.on('changed', () => { 149 | refreshJwtCountBadge(); 150 | this.messageBus.send('jwts', { 151 | action: 'storage.changed' 152 | }); 153 | }); 154 | 155 | this.requestItemStore.on('changed', () => { 156 | refreshJwtCountBadge(); 157 | this.messageBus.send('jwts', { 158 | action: 'requests.changed' 159 | }); 160 | }); 161 | 162 | chrome.tabs.onRemoved.addListener((tabId) => { 163 | this.requestItemStore.remove(request => request.tabId === tabId); 164 | }); 165 | 166 | // When a tab is selected, refresh the badge count and flag it as selected. 167 | chrome.tabs.onActivated.addListener((activeInfo) => { 168 | // This is a hack that we need to do when the DevTools window is detached. 169 | // I.e. when we have detached DevTools from our window, we'll loose the active tab state from that window. 170 | // So because of that we use this in order to track which tab we most recently used. 171 | this.mostRecentTabId = activeInfo.tabId; 172 | 173 | this.messageBus.send('jwts', { 174 | action: 'page.activated', 175 | ...activeInfo 176 | }); 177 | 178 | // Refresh the JWT badge count. 179 | refreshJwtCountBadge(); 180 | }); 181 | 182 | // When the a tab is updated, refresh the keys in local storage and the JWT count badge. 183 | chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => { 184 | this.messageBus.send('jwts', { 185 | action: 'page.updated', 186 | tabId: tabId, 187 | ...changeInfo, 188 | ...tab 189 | }); 190 | 191 | // Only do it once when the request is loading. 192 | if (changeInfo.status === 'loading') { 193 | // Don't clean if we should preserve the logs for the current tab. 194 | if (!(tabId in this.preserveLogsForTabs && this.preserveLogsForTabs[tabId] === true)) { 195 | // Cleanup old requests for the current tab. 196 | this.requestItemStore.remove(request => 197 | // Remove all previous requests on the current tab. 198 | (request.tabId === tabId && request.id < this.mostRecentRequestId + 1) && 199 | // But if the most recent request is the page we're on, then leave that intact. 200 | !(request.id === this.mostRecentRequestId && request.url === tab.url) 201 | ); 202 | } 203 | 204 | // Refresh the JWT badge count. 205 | refreshJwtCountBadge(); 206 | } 207 | }); 208 | 209 | this.requestItemStore.on('set', (item) => { 210 | this.mostRecentRequestId = item.requestId; 211 | }); 212 | 213 | this.cookieJwtDiscoverer.start(); 214 | this.requestJwtDiscoverer.start(); 215 | this.storageJwtDiscoverer.start(); 216 | 217 | chrome.contextMenus.create({ 218 | title: "View JWT", 219 | contexts: ["selection"], 220 | onclick: (e) => { 221 | chrome.tabs.create({ 222 | url:"src/html/ViewJwt.html?jwt=" + encodeURIComponent(e.selectionText) 223 | }); 224 | } 225 | }); 226 | 227 | // Start our messaging service so that 228 | // we can start receiving API calls. 229 | this.messageBus.open(); 230 | this.start(); 231 | } 232 | } 233 | -------------------------------------------------------------------------------- /src/js/app/DevToolsApp.js: -------------------------------------------------------------------------------- 1 | export default class DevToolsApp { 2 | run() { 3 | chrome.devtools.panels.create( 4 | 'JWT', 5 | 'assets/images/default_icon.png', 6 | 'build/html/DevToolsPanel.html', 7 | null 8 | ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/js/app/index.js: -------------------------------------------------------------------------------- 1 | export BackgroundApp from './BackgroundApp'; 2 | export DevToolsApp from './DevToolsApp'; -------------------------------------------------------------------------------- /src/js/backgroundApi.js: -------------------------------------------------------------------------------- 1 | function makeApiCall(method, args) { 2 | return new Promise((accept, reject) => { 3 | var payload = { 4 | method: method, 5 | args: args || [] 6 | }; 7 | 8 | chrome.runtime.sendMessage(payload, function (response) { 9 | if (response.error) { 10 | reject(response.error); 11 | } else { 12 | accept(response.result); 13 | } 14 | }); 15 | }); 16 | } 17 | 18 | export function getCurrentTab() { 19 | return makeApiCall('getCurrentTab'); 20 | } 21 | 22 | export function getCurrentTabJwts() { 23 | return makeApiCall('getCurrentTabJwts'); 24 | } 25 | 26 | export function getCookieJwts() { 27 | return makeApiCall('getCookieJwts'); 28 | } 29 | 30 | export function getClipboardJwt() { 31 | return makeApiCall('getClipboardJwt'); 32 | } 33 | 34 | export function getStorageJwts() { 35 | return makeApiCall('getStorageJwts'); 36 | } 37 | 38 | export function getRequestItems() { 39 | return makeApiCall('getRequestItems'); 40 | } 41 | 42 | export function getPopupState() { 43 | return makeApiCall('getPopupState'); 44 | } 45 | 46 | export function setPopupState(state) { 47 | return makeApiCall('setPopupState', [state]); 48 | } 49 | 50 | export function removeRequestItems(beforeRequestId, tabId) { 51 | return makeApiCall('removeRequestItems', [beforeRequestId, tabId]); 52 | } 53 | 54 | export function setPreserveLog(tabId, state) { 55 | return makeApiCall('setPreserveLog', [tabId, state]); 56 | } 57 | -------------------------------------------------------------------------------- /src/js/component/Checkbox.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default class Checkbox extends React.Component { 4 | state = { 5 | checked: false 6 | }; 7 | 8 | componentWillMount() { 9 | if ('checked' in this.props) { 10 | this.setState({ 11 | checked: Boolean(this.props.checked) 12 | }) 13 | } 14 | } 15 | 16 | onClick(...args) { 17 | this.setState({ 18 | checked: !this.state.checked 19 | }); 20 | 21 | if ('onClick' in this.props) { 22 | this.props.onClick(...args); 23 | } 24 | } 25 | 26 | render() { 27 | let iconClassName = this.state.checked ? 28 | 'fa-check-square' : 'fa-square'; 29 | 30 | let style = { 31 | cursor: 'pointer' 32 | }; 33 | 34 | let checkbox = ( 35 | 36 | ); 37 | 38 | if ('label' in this.props) { 39 | checkbox = ( 40 | 41 | ); 42 | } 43 | 44 | return checkbox; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/js/component/ContentEditable.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | // Originally from: http://stackoverflow.com/a/3866442 4 | function setEndOfContenteditable(contentEditableElement) 5 | { 6 | let range = document.createRange();//Create a range (a range is a like the selection but invisible) 7 | range.selectNodeContents(contentEditableElement);//Select the entire contents of the element with the range 8 | range.collapse(false);//collapse the range to the end point. false means collapse to end rather than the start 9 | let selection = window.getSelection();//get the selection object (allows you to change selection) 10 | selection.removeAllRanges();//remove any selections already made 11 | selection.addRange(range);//make the range you have just created the visible selection 12 | } 13 | 14 | export default class ContentEditable extends React.Component { 15 | constructor() { 16 | super(); 17 | this.emitChange = this.emitChange.bind(this); 18 | } 19 | 20 | render() { 21 | return React.createElement( 22 | this.props.tagName || 'div', 23 | Object.assign({}, this.props, { 24 | ref: (e) => this.htmlEl = e, 25 | onInput: this.emitChange, 26 | onBlur: this.emitChange, 27 | contentEditable: !this.props.disabled, 28 | dangerouslySetInnerHTML: {__html: this.props.html} 29 | }), 30 | this.props.children); 31 | } 32 | 33 | shouldComponentUpdate(nextProps) { 34 | return !this.htmlEl || nextProps.html !== this.htmlEl.innerHTML || 35 | this.props.disabled !== nextProps.disabled; 36 | } 37 | 38 | componentDidUpdate() { 39 | if ( this.htmlEl && this.props.html !== this.htmlEl.innerHTML ) { 40 | this.htmlEl.innerHTML = this.props.html; 41 | setEndOfContenteditable(this.htmlEl); 42 | } 43 | } 44 | 45 | emitChange(evt) { 46 | if (!this.htmlEl) return; 47 | var html = this.htmlEl.innerHTML; 48 | if (this.props.onChange && html !== this.lastHtml) { 49 | evt.target = { value: html }; 50 | this.props.onChange(evt); 51 | } 52 | this.lastHtml = html; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/js/component/Draggable.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | * 9 | * @flow 10 | */ 11 | import React from 'react'; 12 | import ReactDOM from 'react-dom'; 13 | 14 | let nopFn = () => {}; 15 | 16 | export default class Draggable extends React.Component { 17 | props = { 18 | onMove: nopFn, 19 | onStart: nopFn, 20 | onStop: nopFn, 21 | style: Object, 22 | }; 23 | 24 | _onMove = nopFn; 25 | _onUp = nopFn; 26 | 27 | componentDidMount() { 28 | this._onMove = this.onMove.bind(this); 29 | this._onUp = this.onUp.bind(this); 30 | } 31 | 32 | _startDragging(evt) { 33 | evt.preventDefault(); 34 | var doc = ReactDOM.findDOMNode(this).ownerDocument; 35 | doc.addEventListener('mousemove', this._onMove); 36 | doc.addEventListener('mouseup', this._onUp); 37 | this.props.onStart(); 38 | } 39 | 40 | onMove(evt) { 41 | evt.preventDefault(); 42 | this.props.onMove(evt.pageX, evt.pageY); 43 | } 44 | 45 | onUp(evt) { 46 | evt.preventDefault(); 47 | var doc = ReactDOM.findDOMNode(this).ownerDocument; 48 | doc.removeEventListener('mousemove', this._onMove); 49 | doc.removeEventListener('mouseup', this._onUp); 50 | this.props.onStop(); 51 | } 52 | 53 | render() { 54 | return ( 55 |
56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/js/component/ExpandableSection.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { setClipboardText, prettyPrintJson } from '../utils'; 3 | 4 | export default class ExpandableSection extends React.Component { 5 | state = { 6 | expanded: true 7 | }; 8 | 9 | onHeaderClicked() { 10 | this.setState({ 11 | expanded: !this.state.expanded 12 | }); 13 | } 14 | 15 | onCopyClicked(e) { 16 | e.preventDefault(); 17 | e.stopPropagation(); 18 | setClipboardText(this.props.value); 19 | } 20 | 21 | render() { 22 | let name = this.props.name; 23 | let value = this.props.value; 24 | let format = this.props.format || 'plain'; 25 | let expanded = this.state.expanded; 26 | let copyable = this.props.copyable; 27 | 28 | if (format === "json") { 29 | value = prettyPrintJson(value); 30 | } 31 | 32 | let headerIcon = expanded ? "fa-caret-down" : "fa-caret-right"; 33 | 34 | return ( 35 |
36 |
37 | {this.props.name} 38 | { expanded && copyable ? : null } 39 |
40 | { expanded ? 41 |
{value}
: 42 | null } 43 |
44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/js/component/JwtDetail.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ExpandableSection from './ExpandableSection'; 3 | 4 | export default class JwtDetail extends React.Component { 5 | render() { 6 | let jwt = this.props.jwt; 7 | let additionalContent = []; 8 | 9 | if (this.props.additionalContent) { 10 | this.props.additionalContent.forEach((item) => { 11 | additionalContent.push( 12 | 13 | ); 14 | }); 15 | } 16 | 17 | if (this.props.showRaw){ 18 | additionalContent.push( 19 | 20 | ); 21 | } 22 | 23 | return ( 24 |
25 | {additionalContent} 26 | 27 | 28 | 29 |
30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/js/component/JwtTextArea.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import ContentEditable from './ContentEditable'; 4 | import { parseJwt, tokenizeJwt } from '../utils'; 5 | import Textarea from 'react-textarea-autosize'; 6 | 7 | let htmlRegex = /(<([^>]+)>)/ig; 8 | 9 | function trimHtml(value) { 10 | return value.replace(htmlRegex, ""); 11 | } 12 | 13 | function jwtToHtml(value) { 14 | let html = ''; 15 | let tokens = tokenizeJwt(value); 16 | 17 | tokens.forEach((token) => { 18 | html += '' + token.value + ''; 19 | }); 20 | 21 | return html; 22 | } 23 | 24 | export default class JwtTextArea extends React.Component { 25 | state = { 26 | rawValue: '', 27 | formattedValue: '' 28 | }; 29 | 30 | constructor(...args) { 31 | super(...args); 32 | } 33 | 34 | componentWillMount() { 35 | let jwtValue = this.props.jwt || ''; 36 | let trimmedValue = trimHtml(jwtValue.trim()); 37 | 38 | this.setState({ 39 | rawValue: trimmedValue, 40 | formattedValue: jwtToHtml(trimmedValue) 41 | }); 42 | } 43 | 44 | handleChange(event) { 45 | let eventValue = event.target.value; 46 | let trimmedValue = trimHtml(eventValue); 47 | 48 | this.setState({ 49 | rawValue: trimmedValue, 50 | formattedValue: jwtToHtml(trimmedValue) 51 | }); 52 | 53 | if ('onChange' in this.props) { 54 | this.props.onChange({ 55 | value: trimmedValue 56 | }); 57 | } 58 | } 59 | 60 | render() { 61 | let className = 'jwt-editor'; 62 | let jwtValue = this.state.rawValue || this.props.jwt; 63 | 64 | if (jwtValue !== '') { 65 | let parsedJwt = parseJwt(jwtValue); 66 | className += ' ' + (parsedJwt ? 'parse-success' : 'parse-error'); 67 | } 68 | 69 | if (this.props.colorize) { 70 | return ( 71 | 77 | ); 78 | } 79 | 80 | if (this.props.autosize) { 81 | return ( 82 |