Skip to content

Commit

Permalink
Fix: base64url does not work on IE (fix cisco#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxwolf committed Nov 3, 2015
1 parent 36b5e5c commit f4350a4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ buff = jose.util.asBuffer(input);

### URI-Safe Base64 ###

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

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

Expand Down
4 changes: 2 additions & 2 deletions lib/util/base64url.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
"use strict";

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

/**
* @namespace base64url
Expand Down Expand Up @@ -33,7 +33,7 @@ var base64url = {
* @param {String} input The data to decode.
* @returns {Buffer|String} the base64url decoding of {input}.
*/
decode: impl.toBuffer
decode: impl.decode
};

module.exports = base64url;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
],
"license": "Apache-2.0",
"dependencies": {
"base64url": "^1.0.4",
"es6-promise": "^2.0.1",
"jsbn": "git+https://github.com/andyperlitch/jsbn.git",
"lodash.assign": "^3.2.0",
Expand All @@ -44,6 +43,7 @@
"lodash.uniq": "^3.2.1",
"long": "^2.2.3",
"node-forge": "git+https://github.com/linuxwolf/forge.git#master",
"urlsafe-base64": "git+https://github.com/linuxwolf/urlsafe-base64.git#encoding",
"uuid": "^2.0.1",
"yargs": "^3.27.0"
},
Expand Down

0 comments on commit f4350a4

Please sign in to comment.