Skip to content

Commit de772d3

Browse files
committed
add support for decoding utf8 tokens
1 parent fdd038b commit de772d3

File tree

4 files changed

+81
-71
lines changed

4 files changed

+81
-71
lines changed

dist/css/app.css

Lines changed: 73 additions & 68 deletions
Large diffs are not rendered by default.

dist/js/app.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<script type="text/javascript" src="//use.typekit.net/iws6ohy.js"></script>
1313
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
1414

15-
<link rel="stylesheet" href="dist/css/app.css" media="all">
15+
<link rel="stylesheet" href="dist/css/app.css" media="all"/>
1616
<link rel="search" type="application/opensearchdescription+xml" title="JWT.io" href="/opensearch.xml">
1717

1818
<!-- Bootstrap core CSS -->

js/jwt.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ function url_base64_decode(str) {
2424
default:
2525
throw 'Illegal base64url string!';
2626
}
27-
return window.atob(output); //polifyll https://github.com/davidchambers/Base64.js
27+
var result = window.atob(output); //polifyll https://github.com/davidchambers/Base64.js
28+
try{
29+
return decodeURIComponent(escape(result));
30+
} catch (err) {
31+
return result;
32+
}
2833
}
2934

3035
window.decode = function (base64json) {

0 commit comments

Comments
 (0)