@uportal/open-id-connect
Advanced tools
Comparing version 1.35.0 to 1.36.0
@@ -5,6 +5,8 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var decode = require('jwt-decode'); | ||
var decode = _interopDefault(require('jwt-decode')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var decode__default = /*#__PURE__*/_interopDefaultLegacy(decode); | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||
@@ -228,3 +230,3 @@ try { | ||
encoded: jwt, | ||
decoded: decode(jwt) | ||
decoded: decode__default['default'](jwt) | ||
}; | ||
@@ -231,0 +233,0 @@ } |
{ | ||
"name": "@uportal/open-id-connect", | ||
"description": "A shared Open ID Connect authorization helper for uPortal", | ||
"version": "1.35.0", | ||
"version": "1.36.0", | ||
"repository": { | ||
@@ -43,3 +43,3 @@ "type": "git", | ||
"dependencies": { | ||
"jwt-decode": "^2.2.0" | ||
"jwt-decode": "^3.0.0" | ||
}, | ||
@@ -50,3 +50,3 @@ "devDependencies": { | ||
"babel-jest": "^26.0.0", | ||
"eslint-plugin-jest": "^23.13.2", | ||
"eslint-plugin-jest": "^24.0.0", | ||
"jest": "^26.0.0", | ||
@@ -74,3 +74,3 @@ "npm-run-all": "^4.1.5", | ||
}, | ||
"gitHead": "fc69e78d2e998f6030cb0926238b09949e7f1316" | ||
"gitHead": "e0141de42b54234ccd4d66ae66f557321baf7fa6" | ||
} |
@@ -48,7 +48,7 @@ # uPortal Open ID Connect | ||
.default() | ||
.then(function(token) { | ||
.then(function (token) { | ||
console.log(token.encoded); // Raw JWT | ||
console.log(token.decoded); // parsed JSON | ||
}) | ||
.catch(function(err) { | ||
.catch(function (err) { | ||
console.error(err); | ||
@@ -58,3 +58,3 @@ }); | ||
// with a callback | ||
oidc.default({}, function(err, token) { | ||
oidc.default({}, function (err, token) { | ||
if (err) { | ||
@@ -90,4 +90,4 @@ console.error(err); | ||
propertyTransforms: { | ||
example: JSON.parse | ||
} | ||
example: JSON.parse, | ||
}, | ||
}); | ||
@@ -94,0 +94,0 @@ console.log(encoded); |
@@ -32,3 +32,3 @@ import decode from 'jwt-decode'; | ||
userInfoApiUrl = '/uPortal/api/v5-1/userinfo', | ||
propertyTransforms = {} | ||
propertyTransforms = {}, | ||
} = {}, | ||
@@ -41,3 +41,3 @@ callback | ||
method: 'GET', | ||
credentials: 'include' | ||
credentials: 'include', | ||
}); | ||
@@ -85,4 +85,4 @@ | ||
encoded: jwt, | ||
decoded: decode(jwt) | ||
decoded: decode(jwt), | ||
}; | ||
} |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jwt-decode')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'jwt-decode'], factory) : | ||
(global = global || self, factory(global.openIdConnect = {}, global.decode)); | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.openIdConnect = {}, global.decode)); | ||
}(this, (function (exports, decode) { 'use strict'; | ||
decode = decode && Object.prototype.hasOwnProperty.call(decode, 'default') ? decode['default'] : decode; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var decode__default = /*#__PURE__*/_interopDefaultLegacy(decode); | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { | ||
@@ -227,3 +229,3 @@ try { | ||
encoded: jwt, | ||
decoded: decode(jwt) | ||
decoded: decode__default['default'](jwt) | ||
}; | ||
@@ -230,0 +232,0 @@ } |
41332
735
+ Addedjwt-decode@3.1.2(transitive)
- Removedjwt-decode@2.2.0(transitive)
Updatedjwt-decode@^3.0.0