@valentine-efagene/qshelter-common 2.0.96 → 2.0.98
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.
|
@@ -59,11 +59,21 @@ export declare class ConfigService {
|
|
|
59
59
|
*/
|
|
60
60
|
getParameter(name: string): Promise<string>;
|
|
61
61
|
/**
|
|
62
|
-
* Get JWT
|
|
62
|
+
* Get JWT access secret from Secrets Manager
|
|
63
|
+
* Used for signing and verifying access tokens
|
|
64
|
+
*/
|
|
65
|
+
getJwtAccessSecret(stage?: string): Promise<JwtSecrets>;
|
|
66
|
+
/**
|
|
67
|
+
* Get JWT refresh token secret from Secrets Manager
|
|
68
|
+
* Used for signing and verifying refresh tokens
|
|
69
|
+
*/
|
|
70
|
+
getJwtRefreshSecret(stage?: string): Promise<JwtSecrets>;
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated Use getJwtAccessSecret instead
|
|
63
73
|
*/
|
|
64
74
|
getJwtSecret(stage?: string): Promise<JwtSecrets>;
|
|
65
75
|
/**
|
|
66
|
-
*
|
|
76
|
+
* @deprecated Use getJwtRefreshSecret instead
|
|
67
77
|
*/
|
|
68
78
|
getRefreshTokenSecret(stage?: string): Promise<JwtSecrets>;
|
|
69
79
|
/**
|
|
@@ -90,16 +90,30 @@ export class ConfigService {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Get JWT
|
|
93
|
+
* Get JWT access secret from Secrets Manager
|
|
94
|
+
* Used for signing and verifying access tokens
|
|
95
|
+
*/
|
|
96
|
+
async getJwtAccessSecret(stage = process.env.NODE_ENV || 'dev') {
|
|
97
|
+
return this.getSecret(`qshelter/${stage}/jwt-access-secret`);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Get JWT refresh token secret from Secrets Manager
|
|
101
|
+
* Used for signing and verifying refresh tokens
|
|
102
|
+
*/
|
|
103
|
+
async getJwtRefreshSecret(stage = process.env.NODE_ENV || 'dev') {
|
|
104
|
+
return this.getSecret(`qshelter/${stage}/jwt-refresh-secret`);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @deprecated Use getJwtAccessSecret instead
|
|
94
108
|
*/
|
|
95
109
|
async getJwtSecret(stage = process.env.NODE_ENV || 'dev') {
|
|
96
|
-
return this.
|
|
110
|
+
return this.getJwtAccessSecret(stage);
|
|
97
111
|
}
|
|
98
112
|
/**
|
|
99
|
-
*
|
|
113
|
+
* @deprecated Use getJwtRefreshSecret instead
|
|
100
114
|
*/
|
|
101
115
|
async getRefreshTokenSecret(stage = process.env.NODE_ENV || 'dev') {
|
|
102
|
-
return this.
|
|
116
|
+
return this.getJwtRefreshSecret(stage);
|
|
103
117
|
}
|
|
104
118
|
/**
|
|
105
119
|
* Get database credentials - combines secret and infrastructure config
|
package/package.json
CHANGED