@haste-health/jwt 0.12.0 → 0.126.3
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/lib/constants.d.ts +1 -0
- package/lib/constants.js +1 -0
- package/lib/constants.js.map +1 -1
- package/lib/types.d.ts +1 -0
- package/package.json +6 -6
- package/src/constants.ts +1 -0
- package/src/types.ts +2 -3
package/lib/constants.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export declare const CUSTOM_CLAIMS: {
|
|
|
3
3
|
RESOURCE_ID: "https://haste.health/resourceId";
|
|
4
4
|
ACCESS_POLICY_VERSION_IDS: "https://haste.health/accessPolicyVersionIds";
|
|
5
5
|
TENANT: "https://haste.health/tenant";
|
|
6
|
+
PROJECT: "https://haste.health/project";
|
|
6
7
|
ROLE: "https://haste.health/user_role";
|
|
7
8
|
};
|
|
8
9
|
export type ALGORITHMS_ALLOWED = (typeof ALGORITHMS)[keyof typeof ALGORITHMS];
|
package/lib/constants.js
CHANGED
|
@@ -3,6 +3,7 @@ export const CUSTOM_CLAIMS = {
|
|
|
3
3
|
RESOURCE_ID: "https://haste.health/resourceId",
|
|
4
4
|
ACCESS_POLICY_VERSION_IDS: ("https://haste.health/accessPolicyVersionIds"),
|
|
5
5
|
TENANT: "https://haste.health/tenant",
|
|
6
|
+
PROJECT: "https://haste.health/project",
|
|
6
7
|
ROLE: "https://haste.health/user_role",
|
|
7
8
|
};
|
|
8
9
|
export const ALGORITHMS = {
|
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAS,mCAAmC;IACzD,WAAW,EAAS,iCAAiC;IACrD,yBAAyB,EAAS,CAChC,6CAA6C,CAC9C;IACD,MAAM,EAAS,6BAA6B;IAC5C,IAAI,EAAS,gCAAgC;CAC9C,CAAC;AAIF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAS,mCAAmC;IACzD,WAAW,EAAS,iCAAiC;IACrD,yBAAyB,EAAS,CAChC,6CAA6C,CAC9C;IACD,MAAM,EAAS,6BAA6B;IAC5C,OAAO,EAAS,8BAA8B;IAC9C,IAAI,EAAS,gCAAgC;CAC9C,CAAC;AAIF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,CAAC"}
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haste-health/jwt",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.126.3",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"jose": "^6.
|
|
5
|
+
"jose": "^6.2.3"
|
|
6
6
|
},
|
|
7
7
|
"type": "module",
|
|
8
8
|
"description": "JWT utilities for Haste Health. Includes JWT Claim types.",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@jest/globals": "^29.7.0",
|
|
13
13
|
"@types/jest": "^29.5.14",
|
|
14
|
-
"@types/node": "^24.
|
|
14
|
+
"@types/node": "^24.13.2",
|
|
15
15
|
"jest": "^29.7.0",
|
|
16
|
-
"ts-jest": "^29.
|
|
17
|
-
"typescript": "
|
|
18
|
-
"@haste-health/fhir-types": "^0.
|
|
16
|
+
"ts-jest": "^29.4.11",
|
|
17
|
+
"typescript": "6.0.3",
|
|
18
|
+
"@haste-health/fhir-types": "^0.126.3"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
".": "./lib/index.js",
|
package/src/constants.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface HasteHealthCustomClaims<role> {
|
|
|
54
54
|
* The tenant the token is associated with.
|
|
55
55
|
*/
|
|
56
56
|
[CUSTOM_CLAIMS.TENANT]: TenantId;
|
|
57
|
+
[CUSTOM_CLAIMS.PROJECT]: ProjectId;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
export interface SMARTPayload {
|
|
@@ -64,9 +65,7 @@ export interface SMARTPayload {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
export interface AccessTokenPayload<role>
|
|
67
|
-
extends HasteHealthCustomClaims<role>,
|
|
68
|
-
SMARTPayload,
|
|
69
|
-
jose.JWTPayload {
|
|
68
|
+
extends HasteHealthCustomClaims<role>, SMARTPayload, jose.JWTPayload {
|
|
70
69
|
/**
|
|
71
70
|
* REQUIRED. Issuer Identifier for the Issuer of the response.
|
|
72
71
|
* The iss value is a case-sensitive URL using the https scheme that contains scheme, host, and optionally,
|