@connectid-tools/rp-nodejs-sdk 4.1.0 → 4.2.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 +6 -3
- package/config.js +2 -2
- package/package.json +6 -6
- package/relying-party-client-sdk.js +3 -3
- package/utils/cert-utils.d.ts +1 -1
- package/utils/user-agent.d.ts +1 -1
- package/utils/user-agent.js +1 -1
package/README.md
CHANGED
|
@@ -413,13 +413,16 @@ The required function parameters are:
|
|
|
413
413
|
|
|
414
414
|
# Release Notes
|
|
415
415
|
|
|
416
|
-
### 4.
|
|
416
|
+
### 4.2.0 (Aug 8, 2025)
|
|
417
|
+
- `cba_loyalty` claim.
|
|
418
|
+
|
|
419
|
+
### 4.1.0 (Feb 25, 2025)
|
|
417
420
|
- Implemented user-agent support.
|
|
418
421
|
|
|
419
|
-
### 4.0.5 (Feb 24,
|
|
422
|
+
### 4.0.5 (Feb 24, 2025)
|
|
420
423
|
- Add README.md and license files to bundle.
|
|
421
424
|
|
|
422
|
-
### 4.0.4 (Feb 21,
|
|
425
|
+
### 4.0.4 (Feb 21, 2025)
|
|
423
426
|
- Remove `declarationMap`.
|
|
424
427
|
|
|
425
428
|
### 4.0.3 (Nov 29, 2024)
|
package/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const config = {
|
|
2
2
|
data: {
|
|
3
3
|
// Set the signing Key Id based on what is contained in the JWKS
|
|
4
|
-
signing_kid: '
|
|
4
|
+
signing_kid: 'lHf9shwoF1wEES2sB9TBafbs0AVrLiU-1_ntzCrBo8A',
|
|
5
5
|
// The location of the signing certificate and key that are used for signing purposes
|
|
6
6
|
signing_key: './certs/signing.key',
|
|
7
7
|
signing_pem: './certs/signing.pem', // TODO not being used atm
|
|
@@ -9,7 +9,7 @@ export const config = {
|
|
|
9
9
|
transport_key: './certs/transport.key',
|
|
10
10
|
transport_pem: './certs/transport.pem',
|
|
11
11
|
// The location of the root certificate for the trust authority
|
|
12
|
-
ca_pem: './certs/
|
|
12
|
+
ca_pem: './certs/ca.pem',
|
|
13
13
|
// This is the URL that this application is actually running on and using for callbacks (noting that multiple may be registered for the client)
|
|
14
14
|
application_redirect_uri: 'https://tpp.localhost/cb',
|
|
15
15
|
// The registry API endpoint that will list all participants with their auth server details
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectid-tools/rp-nodejs-sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "Digital Identity Relying Party Node SDK",
|
|
5
5
|
"main": "relying-party-client-sdk.js",
|
|
6
6
|
"types": "relying-party-client-sdk.d.ts",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"winston": "^3.17.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^20.
|
|
39
|
+
"@types/node": "^20.19.9",
|
|
40
40
|
"@types/openid-client": "^3.7.0",
|
|
41
41
|
"add-js-extension": "^1.0.4",
|
|
42
|
-
"eslint": "^9.
|
|
43
|
-
"prettier": "^3.
|
|
42
|
+
"eslint": "^9.32.0",
|
|
43
|
+
"prettier": "^3.6.2",
|
|
44
44
|
"replace-in-files-cli": "^2.2.0",
|
|
45
|
-
"tsx": "^4.
|
|
46
|
-
"typescript": "^5.
|
|
45
|
+
"tsx": "^4.20.3",
|
|
46
|
+
"typescript": "^5.9.2"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -17,7 +17,7 @@ import { illegalPurposeChars, isValidCertificate, validatePurpose } from './vali
|
|
|
17
17
|
import { generatePushAuthorisationRequestParams } from './utils/request-utils.js';
|
|
18
18
|
import { buildUserAgent } from './utils/user-agent.js';
|
|
19
19
|
// The extended list of claims which can be requested for a user
|
|
20
|
-
const extendedClaimList = ['over16', 'over18', 'over21', 'over25', 'over65', 'beneficiary_account_au', 'beneficiary_account_au_payid', 'beneficiary_account_international'];
|
|
20
|
+
const extendedClaimList = ['over16', 'over18', 'over21', 'over25', 'over65', 'beneficiary_account_au', 'beneficiary_account_au_payid', 'beneficiary_account_international', 'cba_loyalty'];
|
|
21
21
|
export default class RelyingPartyClientSdk {
|
|
22
22
|
constructor(config) {
|
|
23
23
|
this.purpose = 'verifying your identity';
|
|
@@ -43,7 +43,7 @@ export default class RelyingPartyClientSdk {
|
|
|
43
43
|
this.signingKey = getCertificate(this.config.data.signing_key, this.config.data.signing_key_content);
|
|
44
44
|
this.caPem = getCertificate(this.config.data.ca_pem, this.config.data.ca_pem_content);
|
|
45
45
|
this.logger = getLogger(this.config.data.log_level);
|
|
46
|
-
this.logger.info(`Creating RelyingPartyClientSdk - version 4.
|
|
46
|
+
this.logger.info(`Creating RelyingPartyClientSdk - version 4.2.0`);
|
|
47
47
|
if (this.config.data.purpose) {
|
|
48
48
|
const purposeValidation = validatePurpose(this.config.data.purpose);
|
|
49
49
|
if (purposeValidation === 'INVALID_LENGTH') {
|
|
@@ -75,7 +75,7 @@ export default class RelyingPartyClientSdk {
|
|
|
75
75
|
globalAgent.options.key = this.transportKey;
|
|
76
76
|
globalAgent.options.ca = [this.caPem, ...rootCertificates];
|
|
77
77
|
custom.setHttpOptionsDefaults({ timeout: 10000 });
|
|
78
|
-
// 4.
|
|
78
|
+
// 4.2.0 is replaced with `postbuild` script in package.json (see replace-in-files)
|
|
79
79
|
this.logger.info(`Using ${this.config.data.transport_key_content ? 'transport_key_content' : 'transport_key'} config prop`);
|
|
80
80
|
this.logger.info(`Using ${this.config.data.transport_pem_content ? 'transport_pem_content' : 'transport_pem'} config prop`);
|
|
81
81
|
this.logger.info(`Using ${this.config.data.ca_pem_content ? 'ca_pem_content' : 'ca_pem'} config prop`);
|
package/utils/cert-utils.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getCertificate: (certificatePath?: string, certificateContent?: string) => string |
|
|
1
|
+
export declare const getCertificate: (certificatePath?: string, certificateContent?: string) => string | NonSharedBuffer;
|
package/utils/user-agent.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const packageJsonVersion = "4.
|
|
1
|
+
export declare const packageJsonVersion = "4.2.0";
|
|
2
2
|
export declare const buildUserAgent: (clientId: string) => string;
|
package/utils/user-agent.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getSystemInformation } from './system-information.js';
|
|
2
2
|
// important: Update this every time the package version changes
|
|
3
|
-
export const packageJsonVersion = '4.
|
|
3
|
+
export const packageJsonVersion = '4.2.0';
|
|
4
4
|
export const buildUserAgent = (clientId) => {
|
|
5
5
|
return `cid-rp-nodejs-sdk/${packageJsonVersion} ${getSystemInformation()} +${clientId}`;
|
|
6
6
|
};
|