@bymax-one/nest-auth 1.4.6 → 1.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -85,6 +85,10 @@ var AUTH_ERROR_CODES = {
85
85
  OAUTH_EMAIL_MISMATCH: "auth.oauth_email_mismatch",
86
86
  // Platform admin
87
87
  PLATFORM_AUTH_REQUIRED: "auth.platform_auth_required",
88
+ // Service API keys (machine callers)
89
+ API_KEY_INVALID: "auth.api_key_invalid",
90
+ API_KEY_SCOPE_INSUFFICIENT: "auth.api_key_scope_insufficient",
91
+ API_KEY_NOT_FOUND: "auth.api_key_not_found",
88
92
  /**
89
93
  * An unexpected internal failure. Raised only by the server's optional `AuthExceptionFilter`,
90
94
  * which gives unhandled failures the same envelope everything else answers with.
@@ -129,6 +133,9 @@ var AUTH_ERROR_STATUS = {
129
133
  "auth.oauth_failed": 401,
130
134
  "auth.oauth_email_mismatch": 409,
131
135
  "auth.platform_auth_required": 401,
136
+ "auth.api_key_invalid": 401,
137
+ "auth.api_key_scope_insufficient": 403,
138
+ "auth.api_key_not_found": 404,
132
139
  "auth.internal": 500
133
140
  };
134
141
 
@@ -133,6 +133,9 @@ declare const AUTH_ERROR_CODES: {
133
133
  readonly OAUTH_FAILED: "auth.oauth_failed";
134
134
  readonly OAUTH_EMAIL_MISMATCH: "auth.oauth_email_mismatch";
135
135
  readonly PLATFORM_AUTH_REQUIRED: "auth.platform_auth_required";
136
+ readonly API_KEY_INVALID: "auth.api_key_invalid";
137
+ readonly API_KEY_SCOPE_INSUFFICIENT: "auth.api_key_scope_insufficient";
138
+ readonly API_KEY_NOT_FOUND: "auth.api_key_not_found";
136
139
  /**
137
140
  * An unexpected internal failure. Raised only by the server's optional `AuthExceptionFilter`,
138
141
  * which gives unhandled failures the same envelope everything else answers with.
@@ -133,6 +133,9 @@ declare const AUTH_ERROR_CODES: {
133
133
  readonly OAUTH_FAILED: "auth.oauth_failed";
134
134
  readonly OAUTH_EMAIL_MISMATCH: "auth.oauth_email_mismatch";
135
135
  readonly PLATFORM_AUTH_REQUIRED: "auth.platform_auth_required";
136
+ readonly API_KEY_INVALID: "auth.api_key_invalid";
137
+ readonly API_KEY_SCOPE_INSUFFICIENT: "auth.api_key_scope_insufficient";
138
+ readonly API_KEY_NOT_FOUND: "auth.api_key_not_found";
136
139
  /**
137
140
  * An unexpected internal failure. Raised only by the server's optional `AuthExceptionFilter`,
138
141
  * which gives unhandled failures the same envelope everything else answers with.
@@ -83,6 +83,10 @@ var AUTH_ERROR_CODES = {
83
83
  OAUTH_EMAIL_MISMATCH: "auth.oauth_email_mismatch",
84
84
  // Platform admin
85
85
  PLATFORM_AUTH_REQUIRED: "auth.platform_auth_required",
86
+ // Service API keys (machine callers)
87
+ API_KEY_INVALID: "auth.api_key_invalid",
88
+ API_KEY_SCOPE_INSUFFICIENT: "auth.api_key_scope_insufficient",
89
+ API_KEY_NOT_FOUND: "auth.api_key_not_found",
86
90
  /**
87
91
  * An unexpected internal failure. Raised only by the server's optional `AuthExceptionFilter`,
88
92
  * which gives unhandled failures the same envelope everything else answers with.
@@ -127,6 +131,9 @@ var AUTH_ERROR_STATUS = {
127
131
  "auth.oauth_failed": 401,
128
132
  "auth.oauth_email_mismatch": 409,
129
133
  "auth.platform_auth_required": 401,
134
+ "auth.api_key_invalid": 401,
135
+ "auth.api_key_scope_insufficient": 403,
136
+ "auth.api_key_not_found": 404,
130
137
  "auth.internal": 500
131
138
  };
132
139
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bymax-one/nest-auth",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "Full-stack authentication and authorization package for NestJS, React and Next.js — JWT, MFA, OAuth, sessions, multi-tenant SaaS ready",
5
5
  "author": "Bymax One <support@bymax.one>",
6
6
  "license": "MIT",