Skip to content

Commit

Permalink
Native auth decorator support for impersonate (#208)
Browse files Browse the repository at this point in the history
* update native auth server to latest version

* use signerAddress when validating admins from native auth payload

* version bump
  • Loading branch information
tanghel authored Feb 8, 2024
1 parent 2cf67aa commit 8c98265
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "3.1.5",
"version": "3.1.6",
"packages": [
"packages/*"
],
Expand Down
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-auth",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs auth package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
"dependencies": {
"@multiversx/sdk-core": "^12.15.0",
"@multiversx/sdk-native-auth-server": "^1.0.12",
"@multiversx/sdk-native-auth-server": "^1.0.14",
"@multiversx/sdk-wallet": "^4.2.0",
"jsonwebtoken": "^9.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/native.auth.admin.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ export class NativeAuthAdminGuard implements CanActivate {

const request = ExecutionContextUtils.getRequest(context);

return admins.includes(request.nativeAuth.address);
return admins.includes(request.nativeAuth.signerAddress);
}
}
2 changes: 1 addition & 1 deletion packages/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-cache",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs cache package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-common",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs common package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/elastic/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-elastic",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs elastic package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-http",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs http package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/monitoring/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-monitoring",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs monitoring package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/rabbitmq/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-rabbitmq",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs rabbitmq client package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/redis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-nestjs-redis",
"version": "3.1.5",
"version": "3.1.6",
"description": "Multiversx SDK Nestjs redis client package",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down

0 comments on commit 8c98265

Please sign in to comment.