Skip to content

Commit b7438e4

Browse files
committed
Merge branch 'master' into MOL-13183
2 parents f102d47 + 3c2ee89 commit b7438e4

File tree

7 files changed

+57
-215
lines changed

7 files changed

+57
-215
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22

33
## 9.0.0
44

5-
- Update convenience test suite to include SingPass login with PKCE
65
- **[BREAKING]** `NdiOidcHelper.constructAuthorizationUrl` now requires `nonce` (previously optional) and `userInfoScope` (new) params
76
- Deprecated `NdiOidcHelper.getIdTokenPayload` and `NdiOidcHelper.extractNricAndUuidFromPayload` as they are not needed for NDI PKCE flow
87
- Added `NdiOidcHelper.getUserInfo` to fetch myinfo data from NDI instead of MyInfo
98

9+
## 8.4.7
10+
11+
- Update convenience test suite to include SingPass login with PKCE
12+
- Update axios to v1.8.3
13+
1014
## 8.4.6
1115

1216
- Add `codeVerifier` for new singpass integration

package-lock.json

Lines changed: 36 additions & 199 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@govtechsg/singpass-myinfo-oidc-helper",
3-
"version": "8.4.6",
3+
"version": "8.4.7",
44
"description": "Helper for building a Relying Party to integrate with Singpass OIDC and MyInfo person basic API",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/corppass/corppass-helper-ndi.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { AxiosInstance, AxiosProxyConfig } from "axios";
22
import * as querystringUtil from "querystring";
33
import { createClient } from "../client/axios-client";
44
import { JweUtil } from "../util";
5+
import { DateUtils } from "../util/DateUtils";
56
import { SingpassMyInfoError } from "../util/error/SingpassMyinfoError";
6-
import { logger } from "../util/Logger";
7-
import { AuthInfo, EntityInfo, EserviceAuthResultRow, TokenResponse, TPAccessInfo, UserInfo } from "./shared-constants";
87
import { Key } from "../util/KeyUtil";
8+
import { logger } from "../util/Logger";
99
import { createClientAssertion } from "../util/SigningUtil";
10-
import { DateUtils } from "../util/DateUtils";
10+
import { AuthInfo, EntityInfo, EserviceAuthResultRow, TokenResponse, TPAccessInfo, UserInfo } from "./shared-constants";
1111

1212
interface AccessTokenPayload {
1313
exp: number;
@@ -179,7 +179,7 @@ export class NdiOidcHelper {
179179
if (error) {
180180
throw error;
181181
} else {
182-
throw new SingpassMyInfoError('could not verify with any key');
182+
throw new SingpassMyInfoError("could not verify with any key");
183183
}
184184
} catch (e) {
185185
logger.error("Failed to get access token payload", e);
@@ -219,7 +219,7 @@ export class NdiOidcHelper {
219219
if (error) {
220220
throw error;
221221
} else {
222-
throw new SingpassMyInfoError('could not verify with any key');
222+
throw new SingpassMyInfoError("could not verify with any key");
223223
}
224224
} catch (e) {
225225
logger.error("Failed to get ID token payload", e);

src/singpass/__tests__/singpass-helper-ndi.ext.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import * as jwt from "jsonwebtoken";
2+
import { generators } from "openid-client";
23
import { KeyFormat } from "../../util/KeyUtil";
34
import { logger } from "../../util/Logger";
45
import { NdiOidcHelper, NdiOidcHelperConstructor } from "../singpass-helper-ndi";
56
import { configs } from "./test.configs";
6-
import { generators } from "openid-client";
7+
78
const expectedUinfin = ""; // FIXME: fill in with expected uinfin
89

910
/**

0 commit comments

Comments
 (0)