Skip to content

Commit

Permalink
[ADDED] username postfix in password
Browse files Browse the repository at this point in the history
Signed-off-by: Zeeshan Mehboob <[email protected]>
  • Loading branch information
zesu22 committed Dec 15, 2023
1 parent 57ad286 commit 84f66f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion oidc-ui/src/components/Password.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ export default function Password({
configurationKeys.usernamePrefix
) ?? "";

const usernamePostfix =
openIDConnectService.getEsignetConfiguration(
configurationKeys.usernamePostfix
) ?? "";

fields[0].prefix = usernamePrefix;

const passwordRegex = new RegExp(passwordRegexValue);
Expand Down Expand Up @@ -103,7 +108,7 @@ export default function Password({
try {
let transactionId = openIDConnectService.getTransactionId();

let uin = usernamePrefix + loginState["Password_mosip-uin"];
let uin = usernamePrefix + loginState["Password_mosip-uin"] + usernamePostfix;
let challengeType = challengeTypes.pwd;
let challenge = loginState["Password_password"];
let challengeFormat = challengeFormats.pwd;
Expand Down
1 change: 1 addition & 0 deletions oidc-ui/src/constants/clientConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ const configurationKeys = {
passwordRegex: "password.regex",
usernameRegex: "username.regex",
usernamePrefix: "username.prefix",
usernamePostfix: "username.postfix",
consentScreenExpireInSec: "consent.screen.timeout-in-secs",
consentScreenTimeOutBufferInSec: "consent.screen.timeout-buffer-in-secs",
walletQrCodeAutoRefreshLimit: "wallet.qr-code.auto-refresh-limit",
Expand Down

0 comments on commit 84f66f6

Please sign in to comment.