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

@liquid-state/iwa-identity

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liquid-state/iwa-identity - npm Package Compare versions

Comparing version

to
1.2.0

2

dist/jwt.d.ts

@@ -22,2 +22,4 @@ import Identity from './identity';

private isExpired();
private intoIdentity(identityName, credentials);
private extractSub(credentials);
}

@@ -84,3 +84,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

return __generator(this, function (_a) {
this.identity = new Identity(identity, credentials);
this.identity = this.intoIdentity(identity, credentials);
if (store) {

@@ -110,3 +110,3 @@ this.store.store(this.serviceName, { identity: identity, credentials: credentials });

_a = _b.sent(), identity = _a.identity, credentials = _a.credentials;
return [2 /*return*/, new Identity(identity, credentials)];
return [2 /*return*/, this.intoIdentity(identity, credentials)];
}

@@ -149,2 +149,15 @@ });

};
JWTProvider.prototype.intoIdentity = function (identityName, credentials) {
var ids = new Map();
ids.set('sub', this.extractSub(credentials));
return new Identity(identityName, credentials, ids);
};
JWTProvider.prototype.extractSub = function (credentials) {
if (!credentials) {
return undefined;
}
var payload = credentials.jwt.split('.')[1];
var parsed = JSON.parse(atob(payload));
return parsed.sub;
};
return JWTProvider;

@@ -151,0 +164,0 @@ }());

2

package.json
{
"name": "@liquid-state/iwa-identity",
"version": "1.1.2",
"version": "1.2.0",
"description": "Plugin for identity and credentials management in Liquid State IWAs",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet