@authup/errors 1.0.0-beta.35 → 1.0.0-beta.36

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/dist/index.mjs CHANGED
@@ -38,7 +38,7 @@ var AuthupError = class extends BadRequestError {
38
38
  var HTTPError = class HTTPError extends AuthupError {
39
39
  static unsupportedHeaderType(type) {
40
40
  return new HTTPError({
41
- code: ErrorCode.HTTP_HEADER_AUTH_TYPE_UNSUPPORTED,
41
+ code: "unsupported_auth_header_type",
42
42
  message: `The authorization header type ${type} is not supported.`
43
43
  });
44
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/constants.ts","../src/module.ts","../src/built-in/http.ts"],"sourcesContent":["/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum ErrorCode {\n // HTTP Codes\n HTTP_HEADER_AUTH_TYPE_UNSUPPORTED = 'unsupported_auth_header_type',\n\n // Entity Codes\n ENTITY_CREDENTIALS_INVALID = 'invalid_credentials',\n ENTITY_INACTIVE = 'entity_inactive',\n ENTITY_NOT_FOUND = 'entity_not_found',\n\n // JWK Codes\n JWK_INVALID = 'jwk_invalid',\n JWK_NOT_FOUND = 'jwk_not_found',\n\n // JWT Codes\n JWT_INVALID = 'invalid_token',\n JWT_INACTIVE = 'inactive_token',\n JWT_EXPIRED = 'expired_token',\n\n // Oauth2 Codes\n OAUTH_REDIRECT_URI_MISMATCH = 'redirect_uri_mismatch',\n OAUTH_CLIENT_INVALID = 'invalid_client',\n OAUTH_GRANT_INVALID = 'invalid_grant',\n OAUTH_GRANT_TYPE_UNSUPPORTED = 'unsupported_token_grant_type',\n OAUTH_SCOPE_INVALID = 'invalid_scope',\n OAUTH_SCOPE_INSUFFICIENT = 'insufficient_scope',\n\n // Permission Codes\n PERMISSION_NOT_FOUND = 'permission_not_found',\n PERMISSION_DENIED = 'permission_denied',\n PERMISSION_EVALUATION_FAILED = 'permission_evaluation_failed',\n\n // Policy Codes\n POLICY_EVALUATOR_NOT_FOUND = 'policy_evaluator_not_found',\n POLICY_EVALUATOR_NOT_PROCESSABLE = 'policy_evaluator_not_processable',\n POLICY_EVALUATOR_CONTEXT_INVALID = 'policy_evaluator_context_invalid',\n}\n","/*\n * Copyright (c) 2024-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { Input } from '@ebec/http';\nimport { BadRequestError } from '@ebec/http';\nimport type { Issue } from 'validup';\n\nexport class AuthupError extends BadRequestError {\n public readonly issues : Issue[];\n\n constructor(...input: Input[]) {\n super(...input);\n\n this.issues = [];\n }\n}\n","/*\n * Copyright (c) 2022-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { AuthorizationHeaderType } from 'hapic';\nimport { ErrorCode } from '../constants';\nimport { AuthupError } from '../module';\n\nexport class HTTPError extends AuthupError {\n static unsupportedHeaderType(type: `${AuthorizationHeaderType}`) {\n return new HTTPError({\n code: ErrorCode.HTTP_HEADER_AUTH_TYPE_UNSUPPORTED,\n message: `The authorization header type ${type} is not supported.`,\n });\n }\n}\n"],"mappings":";;AAOA,IAAY,YAAL,yBAAA,WAAA;AAEH,WAAA,uCAAA;AAGA,WAAA,gCAAA;AACA,WAAA,qBAAA;AACA,WAAA,sBAAA;AAGA,WAAA,iBAAA;AACA,WAAA,mBAAA;AAGA,WAAA,iBAAA;AACA,WAAA,kBAAA;AACA,WAAA,iBAAA;AAGA,WAAA,iCAAA;AACA,WAAA,0BAAA;AACA,WAAA,yBAAA;AACA,WAAA,kCAAA;AACA,WAAA,yBAAA;AACA,WAAA,8BAAA;AAGA,WAAA,0BAAA;AACA,WAAA,uBAAA;AACA,WAAA,kCAAA;AAGA,WAAA,gCAAA;AACA,WAAA,sCAAA;AACA,WAAA,sCAAA;;KACH;;;AC/BD,IAAa,cAAb,cAAiC,gBAAgB;CAC7C;CAEA,YAAY,GAAG,OAAgB;AAC3B,QAAM,GAAG,MAAM;AAEf,OAAK,SAAS,EAAE;;;;;ACNxB,IAAa,YAAb,MAAa,kBAAkB,YAAY;CACvC,OAAO,sBAAsB,MAAoC;AAC7D,SAAO,IAAI,UAAU;GACjB,MAAM,UAAU;GAChB,SAAS,iCAAiC,KAAK;GAClD,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/constants.ts","../src/module.ts","../src/built-in/http.ts"],"sourcesContent":["/*\n * Copyright (c) 2022-2024.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nexport enum ErrorCode {\n // HTTP Codes\n HTTP_HEADER_AUTH_TYPE_UNSUPPORTED = 'unsupported_auth_header_type',\n\n // Entity Codes\n ENTITY_CREDENTIALS_INVALID = 'invalid_credentials',\n ENTITY_INACTIVE = 'entity_inactive',\n ENTITY_NOT_FOUND = 'entity_not_found',\n\n // JWK Codes\n JWK_INVALID = 'jwk_invalid',\n JWK_NOT_FOUND = 'jwk_not_found',\n\n // JWT Codes\n JWT_INVALID = 'invalid_token',\n JWT_INACTIVE = 'inactive_token',\n JWT_EXPIRED = 'expired_token',\n\n // Oauth2 Codes\n OAUTH_REDIRECT_URI_MISMATCH = 'redirect_uri_mismatch',\n OAUTH_CLIENT_INVALID = 'invalid_client',\n OAUTH_GRANT_INVALID = 'invalid_grant',\n OAUTH_GRANT_TYPE_UNSUPPORTED = 'unsupported_token_grant_type',\n OAUTH_SCOPE_INVALID = 'invalid_scope',\n OAUTH_SCOPE_INSUFFICIENT = 'insufficient_scope',\n\n // Permission Codes\n PERMISSION_NOT_FOUND = 'permission_not_found',\n PERMISSION_DENIED = 'permission_denied',\n PERMISSION_EVALUATION_FAILED = 'permission_evaluation_failed',\n\n // Policy Codes\n POLICY_EVALUATOR_NOT_FOUND = 'policy_evaluator_not_found',\n POLICY_EVALUATOR_NOT_PROCESSABLE = 'policy_evaluator_not_processable',\n POLICY_EVALUATOR_CONTEXT_INVALID = 'policy_evaluator_context_invalid',\n}\n","/*\n * Copyright (c) 2024-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { Input } from '@ebec/http';\nimport { BadRequestError } from '@ebec/http';\nimport type { Issue } from 'validup';\n\nexport class AuthupError extends BadRequestError {\n public readonly issues : Issue[];\n\n constructor(...input: Input[]) {\n super(...input);\n\n this.issues = [];\n }\n}\n","/*\n * Copyright (c) 2022-2026.\n * Author Peter Placzek (tada5hi)\n * For the full copyright and license information,\n * view the LICENSE file that was distributed with this source code.\n */\n\nimport type { AuthorizationHeaderType } from 'hapic';\nimport { ErrorCode } from '../constants';\nimport { AuthupError } from '../module';\n\nexport class HTTPError extends AuthupError {\n static unsupportedHeaderType(type: `${AuthorizationHeaderType}`) {\n return new HTTPError({\n code: ErrorCode.HTTP_HEADER_AUTH_TYPE_UNSUPPORTED,\n message: `The authorization header type ${type} is not supported.`,\n });\n }\n}\n"],"mappings":";;AAOA,IAAY,YAAL,yBAAA,WAAA;AAEH,WAAA,uCAAA;AAGA,WAAA,gCAAA;AACA,WAAA,qBAAA;AACA,WAAA,sBAAA;AAGA,WAAA,iBAAA;AACA,WAAA,mBAAA;AAGA,WAAA,iBAAA;AACA,WAAA,kBAAA;AACA,WAAA,iBAAA;AAGA,WAAA,iCAAA;AACA,WAAA,0BAAA;AACA,WAAA,yBAAA;AACA,WAAA,kCAAA;AACA,WAAA,yBAAA;AACA,WAAA,8BAAA;AAGA,WAAA,0BAAA;AACA,WAAA,uBAAA;AACA,WAAA,kCAAA;AAGA,WAAA,gCAAA;AACA,WAAA,sCAAA;AACA,WAAA,sCAAA;;KACH;;;AC/BD,IAAa,cAAb,cAAiC,gBAAgB;CAC7C;CAEA,YAAY,GAAG,OAAgB;AAC3B,QAAM,GAAG,MAAM;AAEf,OAAK,SAAS,EAAE;;;;;ACNxB,IAAa,YAAb,MAAa,kBAAkB,YAAY;CACvC,OAAO,sBAAsB,MAAoC;AAC7D,SAAO,IAAI,UAAU;GACjB,MAAA;GACA,SAAS,iCAAiC,KAAK;GAClD,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@authup/errors",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.35",
4
+ "version": "1.0.0-beta.36",
5
5
  "description": "Package containing error codes and basic error classes.",
6
6
  "license": "Apache-2.0",
7
7
  "exports": {