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

@itwin/service-authorization

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@itwin/service-authorization - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

10

CHANGELOG.md
# Change Log - @itwin/service-authorization
This log was last generated on Tue, 25 Jan 2022 15:34:41 GMT and should not be manually modified.
This log was last generated on Mon, 21 Mar 2022 12:23:06 GMT and should not be manually modified.
## 0.6.2
Mon, 21 Mar 2022 12:23:06 GMT
### Patches
- Cast to resolve type error between union type
- Update token handling to provide better error message when an empty string or invalid token format is provided.
## 0.6.1

@@ -6,0 +14,0 @@ Tue, 25 Jan 2022 15:34:41 GMT

7

lib/cjs/introspection/IntrospectionClient.js

@@ -17,3 +17,6 @@ "use strict";

function removeAccessTokenPrefix(accessToken) {
return accessToken.substr(accessToken.indexOf(" ") + 1);
const splitAccessToken = accessToken.split(" ");
if (splitAccessToken.length !== 2)
throw new core_bentley_1.BentleyError(core_bentley_1.BentleyStatus.ERROR, "Failed to decode JWT");
return splitAccessToken[1];
}

@@ -66,3 +69,3 @@ /** @alpha */

async validateToken(accessToken) {
const decoded = jwt.decode(accessToken, { complete: true });
const decoded = jwt.decode(accessToken, { complete: true, json: true });
if (!decoded)

@@ -69,0 +72,0 @@ throw new Error("Failed to decode JWT");

{
"name": "@itwin/service-authorization",
"version": "0.6.1",
"version": "0.6.2",
"description": "Service authorization client for iTwin platform",

@@ -5,0 +5,0 @@ "main": "lib/cjs/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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