New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uportal/open-id-connect

Package Overview
Dependencies
Maintainers
6
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uportal/open-id-connect - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

dist/open-id-connect.js

@@ -1,1 +0,1 @@

'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.tokenize=tokenize;var _axios=require('axios'),_jsonwebtoken=require('jsonwebtoken');function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}var token=null;exports.default=function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(){var b,c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},d=c.userInfoApiUrl,e=d===void 0?'/uPortal/api/v5-1/userinfo':d,f=c.timeout,g=f===void 0?5e4:f,h=arguments[1];return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(null===token){a.next=2;break}return a.abrupt('return',token);case 2:return a.prev=2,a.next=5,(0,_axios.get)(e,{responseType:'text'});case 5:return b=a.sent,token=tokenize(b),setTimeout(function(){token=null},g),h(null,token),a.abrupt('return',token);case 12:if(a.prev=12,a.t0=a['catch'](2),h){a.next=16;break}throw a.t0;case 16:h(a.t0);case 17:case'end':return a.stop();}},a,this,[[2,12]])}));return function(){return a.apply(this,arguments)}}();function tokenize(a){return{encoded:a,decoded:(0,_jsonwebtoken.decode)(a)}}
'use strict';Object.defineProperty(exports,'__esModule',{value:!0}),exports.tokenize=tokenize;var _axios=require('axios'),_jsonwebtoken=require('jsonwebtoken');function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}var token=null;exports.default=function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(){var b,c=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},d=c.userInfoApiUrl,e=d===void 0?'/uPortal/api/v5-1/userinfo':d,f=c.timeout,g=f===void 0?5e4:f,h=1<arguments.length&&arguments[1]!==void 0?arguments[1]:function(){};return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(null===token){a.next=2;break}return a.abrupt('return',token);case 2:return a.prev=2,a.next=5,(0,_axios.get)(e,{responseType:'text'});case 5:return b=a.sent,token=tokenize(b),setTimeout(function(){token=null},g),h(null,token),a.abrupt('return',token);case 12:if(a.prev=12,a.t0=a['catch'](2),h){a.next=16;break}throw a.t0;case 16:h(a.t0);case 17:case'end':return a.stop();}},a,this,[[2,12]])}));return function(){return a.apply(this,arguments)}}();function tokenize(a){return{encoded:a,decoded:(0,_jsonwebtoken.decode)(a)}}
{
"name": "@uportal/open-id-connect",
"description": "A shared Open ID Connect authorization helper for uPortal",
"version": "0.0.2",
"version": "0.0.3",
"repository": {

@@ -33,3 +33,3 @@ "type": "git",

"scripts": {
"prepublish": "npm run build",
"prepublishOnly": "npm run build",
"build": "babel src -d dist",

@@ -36,0 +36,0 @@ "test": "jest"

@@ -32,3 +32,3 @@ import {get} from 'axios';

{userInfoApiUrl = '/uPortal/api/v5-1/userinfo', timeout = 50000} = {},
callback
callback = () => {}
) {

@@ -35,0 +35,0 @@ // If there already is a valid token, resolve it

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc