Skip to content

Commit 1ab7572

Browse files
committed
Fix: base64url does not work on IE (fix #16)
1 parent 9df51df commit 1ab7572

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ buff = jose.util.asBuffer(input);
487487

488488
### URI-Safe Base64 ###
489489

490-
This exposes [base64url](https://github.com/brianloveswords/base64url)'s `encode` and `toBuffer` methods as `encode` and `decode` (respectively).
490+
This exposes [urlsafe-base64](https://github.com/RGBboy/urlsafe-base64)'s `encode` and `decode` methods as `encode` and `decode` (respectively).
491491

492492
To convert from a Buffer to a base64uri-encoded String:
493493

lib/util/base64url.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
"use strict";
77

8-
var impl = require("base64url");
8+
var impl = require("urlsafe-base64");
99

1010
/**
1111
* @namespace base64url
@@ -33,7 +33,7 @@ var base64url = {
3333
* @param {String} input The data to decode.
3434
* @returns {Buffer|String} the base64url decoding of {input}.
3535
*/
36-
decode: impl.toBuffer
36+
decode: impl.decode
3737
};
3838

3939
module.exports = base64url;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
],
2626
"license": "Apache-2.0",
2727
"dependencies": {
28-
"base64url": "^1.0.4",
2928
"es6-promise": "^2.0.1",
3029
"jsbn": "git+https://github.com/andyperlitch/jsbn.git",
3130
"lodash.assign": "^3.2.0",
@@ -40,6 +39,7 @@
4039
"lodash.uniq": "^3.2.1",
4140
"long": "^2.2.3",
4241
"node-forge": "git+https://github.com/linuxwolf/forge.git#master",
42+
"urlsafe-base64": "git+https://github.com/linuxwolf/urlsafe-base64.git#encoding",
4343
"uuid": "^2.0.1"
4444
},
4545
"devDependencies": {

0 commit comments

Comments
 (0)