@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.
- package/CHANGELOG.md +91 -1
- package/README.md +329 -38
- package/dist/server/index.cjs +1328 -317
- package/dist/server/index.d.cts +636 -15
- package/dist/server/index.d.ts +636 -15
- package/dist/server/index.mjs +1325 -321
- package/dist/shared/index.cjs +7 -0
- package/dist/shared/index.d.cts +3 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.mjs +7 -0
- package/package.json +1 -1
package/dist/shared/index.cjs
CHANGED
|
@@ -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
|
|
package/dist/shared/index.d.cts
CHANGED
|
@@ -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.
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -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.
|
package/dist/shared/index.mjs
CHANGED
|
@@ -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.
|
|
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",
|