@canton-network/core-wallet-auth 0.6.0 → 0.8.0
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/README.md +1 -1
- package/dist/auth-utils.d.ts +3 -0
- package/dist/auth-utils.d.ts.map +1 -0
- package/dist/auth-utils.js +11 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ The `verifyToken` method takes an access token and returns an `AuthContext` if t
|
|
|
38
38
|
|
|
39
39
|
## JWT Implementation
|
|
40
40
|
|
|
41
|
-
For JWT-based authentication, see the [`JwtAuthService`](../
|
|
41
|
+
For JWT-based authentication, see the [`JwtAuthService`](../wallet-gateway/remote/src/auth/JwtAuthService.ts) implementation.
|
|
42
42
|
This service verifies JWT tokens using remote JWK sets and integrates with the Wallet Gateway's network configuration to dynamically resolve the appropriate identity provider for each request.
|
|
43
43
|
|
|
44
44
|
It is important to note that, since the Wallet Gateway supports multiple identity providers (IDPs), the token issuer (iss) is used as the unique identifier for each IDP.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-utils.d.ts","sourceRoot":"","sources":["../src/auth-utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAGpD,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAO5E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Copyright (c) 2025 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { providerErrors } from '@canton-network/core-rpc-errors';
|
|
4
|
+
export function assertConnected(authContext) {
|
|
5
|
+
if (!authContext) {
|
|
6
|
+
throw providerErrors.unauthorized({
|
|
7
|
+
message: 'User is not connected',
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
return authContext.userId;
|
|
11
|
+
}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAA;AACjC,cAAc,iCAAiC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,mBAAmB,CAAA;AACjC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iBAAiB,CAAA"}
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canton-network/core-wallet-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Provides authentication middleware and user management for the Wallet Gateway",
|
|
6
6
|
"repository": "github:hyperledger-labs/splice-wallet-kernel",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc -b",
|
|
14
14
|
"dev": "tsc -b --watch",
|
|
15
|
+
"flatpack": "yarn pack --out \"$FLATPACK_OUTDIR\"",
|
|
15
16
|
"clean": "tsc -b --clean; rm -rf dist",
|
|
16
17
|
"test": "yarn node --experimental-vm-modules $(yarn bin jest) --passWithNoTests"
|
|
17
18
|
},
|
|
@@ -26,7 +27,8 @@
|
|
|
26
27
|
"typescript": "^5.8.3"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
|
-
"@canton-network/core-
|
|
30
|
+
"@canton-network/core-rpc-errors": "",
|
|
31
|
+
"@canton-network/core-types": ""
|
|
30
32
|
},
|
|
31
33
|
"files": [
|
|
32
34
|
"dist/**"
|