User password regular expression to validate consecutive repeating characters
This commit is contained in:
@@ -180,6 +180,7 @@ Available languages:
|
|||||||
| MIFOS_DEFAULT_CHAR_DELIMITER | Character delimiter for CSV exports | , |
|
| MIFOS_DEFAULT_CHAR_DELIMITER | Character delimiter for CSV exports | , |
|
||||||
| MIFOS_WAIT_TIME_FOR_NOTIFICATIONS | Wait time in seconds for reading notifications | 60 |
|
| MIFOS_WAIT_TIME_FOR_NOTIFICATIONS | Wait time in seconds for reading notifications | 60 |
|
||||||
| MIFOS_WAIT_TIME_FOR_CATCHUP | Wait time in seconds for reading COB Catch-Up status | 30 |
|
| MIFOS_WAIT_TIME_FOR_CATCHUP | Wait time in seconds for reading COB Catch-Up status | 30 |
|
||||||
|
| MIFOS_MIN_PASSWORD_LENGTH | WMinimum length for user passwords | 12 |
|
||||||
|
|
||||||
#### UI Display Settings
|
#### UI Display Settings
|
||||||
|
|
||||||
|
|||||||
@@ -114,38 +114,4 @@ export class AccountTransfersService {
|
|||||||
getViewAccountTransferDetails(transferId: any): Observable<any> {
|
getViewAccountTransferDetails(transferId: any): Observable<any> {
|
||||||
return this.http.get(`/accounttransfers/${transferId}`);
|
return this.http.get(`/accounttransfers/${transferId}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAccountByNumber(accountNumber: string, currency: string): Observable<any> {
|
|
||||||
const payload = {
|
|
||||||
partyId: accountNumber,
|
|
||||||
partyIdType: 'MSISDN',
|
|
||||||
currencyCode: currency
|
|
||||||
};
|
|
||||||
const headers = new HttpHeaders({ 'Content-Type': 'application/json' });
|
|
||||||
return this.http
|
|
||||||
.post(
|
|
||||||
`${environment.vNextApiUrl}${environment.vNextApiVersion}${environment.vNextApiProvider}/participant`,
|
|
||||||
JSON.stringify(payload),
|
|
||||||
{ headers }
|
|
||||||
)
|
|
||||||
.pipe(
|
|
||||||
switchMap((participant: any) => {
|
|
||||||
const body = JSON.stringify({ ...payload, ownerFspId: participant.fspId });
|
|
||||||
return this.http.post(
|
|
||||||
`${environment.vNextApiUrl}${environment.vNextApiVersion}${environment.vNextApiProvider}/partyinfo`,
|
|
||||||
body,
|
|
||||||
{ headers }
|
|
||||||
);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sendInterbankTransfer(body: any): Observable<any> {
|
|
||||||
const headers = new HttpHeaders({ 'Content-Type': 'application/json' });
|
|
||||||
return this.http.post(
|
|
||||||
`${environment.vNextApiUrl}${environment.vNextApiVersion}${environment.vNextApiProvider}/executetransfer`,
|
|
||||||
body,
|
|
||||||
{ headers }
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-25
@@ -318,31 +318,7 @@ export class MakeAccountTransfersComponent implements OnInit, AfterViewInit {
|
|||||||
},
|
},
|
||||||
note: this.makeAccountTransferForm.controls.transferDescription.value
|
note: this.makeAccountTransferForm.controls.transferDescription.value
|
||||||
};
|
};
|
||||||
this.accountTransfersService.sendInterbankTransfer(JSON.stringify(payload)).subscribe(
|
|
||||||
(trnsfr) => {
|
|
||||||
if (trnsfr.systemMessage) {
|
|
||||||
this.isLoading = false;
|
|
||||||
this.router.navigate(['../../transactions'], { relativeTo: this.route });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
(error) => {
|
|
||||||
this.isLoading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
searchAccountByNumber() {
|
searchAccountByNumber() {}
|
||||||
this.isLoading = true;
|
|
||||||
this.accountTransfersService
|
|
||||||
.getAccountByNumber(this.phoneAccount, this.accountTransferTemplateData.currency.code)
|
|
||||||
.subscribe(
|
|
||||||
(acc) => {
|
|
||||||
this.interbankTransferForm = true;
|
|
||||||
this.createMakeAccountInterbankTransferForm(acc);
|
|
||||||
},
|
|
||||||
(error) => {
|
|
||||||
this.isLoading = false;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@
|
|||||||
{{ 'labels.commons.Password should include a' | translate }}
|
{{ 'labels.commons.Password should include a' | translate }}
|
||||||
<strong>{{ 'labels.commons.numeral' | translate }}</strong> {{ 'labels.commons.and at' | translate }}
|
<strong>{{ 'labels.commons.numeral' | translate }}</strong> {{ 'labels.commons.and at' | translate }}
|
||||||
<strong>{{ 'labels.commons.least one uppercase' | translate }}</strong>
|
<strong>{{ 'labels.commons.least one uppercase' | translate }}</strong>
|
||||||
,<strong>{{ 'labels.commons.lowercase and special character' | translate }}</strong>
|
, <strong>{{ 'labels.commons.lowercase and special character' | translate }}</strong>
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { AbstractControl, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
|
import { AbstractControl, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
|
||||||
|
import { environment } from 'environments/environment';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
@@ -7,14 +8,14 @@ import { Subscription } from 'rxjs';
|
|||||||
})
|
})
|
||||||
export class PasswordsUtility {
|
export class PasswordsUtility {
|
||||||
// password regex pattern
|
// password regex pattern
|
||||||
public static PASSWORD_REGEX = '^(?!.*(.)\\1)(?!.*\\s)(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^\\w\\s]).{12,50}$';
|
public static PASSWORD_REGEX = '^(?!.*(.)\\1{1,})(?!.*\\s)(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[^\\w\\s]).{12,50}$';
|
||||||
|
|
||||||
public getPasswordValidators(): ValidatorFn[] {
|
public getPasswordValidators(): ValidatorFn[] {
|
||||||
return [
|
return [
|
||||||
Validators.required,
|
Validators.required,
|
||||||
Validators.pattern(PasswordsUtility.PASSWORD_REGEX),
|
Validators.pattern(PasswordsUtility.PASSWORD_REGEX),
|
||||||
Validators.maxLength(50),
|
Validators.maxLength(50),
|
||||||
Validators.minLength(8)];
|
Validators.minLength(environment.minPasswordLength)];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export class SavingsAccountViewComponent implements OnInit {
|
|||||||
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
|
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (this.savingsAccountData.externalId && environment.interbankTransfers === 'true') {
|
if (this.savingsAccountData.externalId) {
|
||||||
this.buttonConfig.addOption({
|
this.buttonConfig.addOption({
|
||||||
name: 'Interbank Transfer',
|
name: 'Interbank Transfer',
|
||||||
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
|
taskPermissionName: 'CREATE_ACCOUNTTRANSFER'
|
||||||
|
|||||||
@@ -39,9 +39,8 @@
|
|||||||
>
|
>
|
||||||
{{ 'labels.commons.Password should include a' | translate }}
|
{{ 'labels.commons.Password should include a' | translate }}
|
||||||
<strong>{{ 'labels.commons.numeral' | translate }}</strong> {{ 'labels.commons.and at' | translate }}
|
<strong>{{ 'labels.commons.numeral' | translate }}</strong> {{ 'labels.commons.and at' | translate }}
|
||||||
<strong>{{ 'labels.commons.least one uppercase' | translate }}</strong> ,<strong>{{
|
<strong>{{ 'labels.commons.least one uppercase' | translate }}</strong
|
||||||
'labels.commons.lowercase and special character' | translate
|
>, <strong>{{ 'labels.commons.lowercase and special character' | translate }}</strong>
|
||||||
}}</strong>
|
|
||||||
</mat-error>
|
</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
|
|||||||
+2
-4
@@ -44,9 +44,7 @@
|
|||||||
// OAuth Client Id
|
// OAuth Client Id
|
||||||
window['env']['oauthAppId'] = '';
|
window['env']['oauthAppId'] = '';
|
||||||
|
|
||||||
window["env"]["vNextApiUrl"] = '';
|
// Min Password length
|
||||||
window["env"]["vNextApiProvider"] = '';
|
window['env']['minPasswordLength'] = '12';
|
||||||
window["env"]["vNextApiVersion"] = '';
|
|
||||||
window["env"]["interbankTransfers"] = "false";
|
|
||||||
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|||||||
@@ -44,8 +44,6 @@
|
|||||||
// OAuth Client Id
|
// OAuth Client Id
|
||||||
window['env']['oauthAppId'] = '$MIFOS_OAUTH_CLIENT_ID';
|
window['env']['oauthAppId'] = '$MIFOS_OAUTH_CLIENT_ID';
|
||||||
|
|
||||||
window['env']['vNextApiUrl'] = '$VNEXT_API_URL';
|
// Min Password length
|
||||||
window['env']['vNextApiProvider'] = '$VNEXT_API_PROVIDER';
|
window['env']['minPasswordLength'] = '$MIFOS_MIN_PASSWORD_LENGTH';
|
||||||
window['env']['vNextApiVersion'] = '$VNEXT_API_VERSION';
|
|
||||||
window['env']['interbankTransfers'] = '$VNEXT_INTERBANK_TRANSFERS';
|
|
||||||
})(this);
|
})(this);
|
||||||
|
|||||||
@@ -51,10 +51,8 @@ export const environment = {
|
|||||||
idleTimeout: loadedEnv['sessionIdleTimeout'] || 300000 // 5 minutes
|
idleTimeout: loadedEnv['sessionIdleTimeout'] || 300000 // 5 minutes
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
vNextApiUrl: window['env']['vNextApiUrl'] || 'https://apis.flexcore.mx',
|
|
||||||
vNextApiProvider: window['env']['vNextApiProvider'] || '/vnext1',
|
minPasswordLength: loadedEnv['minPasswordLength'] || 12
|
||||||
vNextApiVersion: window['env']['vNextApiVersion'] || '/v1.0',
|
|
||||||
interbankTransfers: window['env']['interbankTransfers'] || false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Server URL
|
// Server URL
|
||||||
|
|||||||
@@ -55,10 +55,8 @@ export const environment = {
|
|||||||
idleTimeout: loadedEnv['sessionIdleTimeout'] || 300000 // 5 minutes
|
idleTimeout: loadedEnv['sessionIdleTimeout'] || 300000 // 5 minutes
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
vNextApiUrl: window['env']['vNextApiUrl'] || 'https://apis.flexcore.mx',
|
|
||||||
vNextApiProvider: window['env']['vNextApiProvider'] || '/vnext1',
|
minPasswordLength: loadedEnv['minPasswordLength'] || 12
|
||||||
vNextApiVersion: window['env']['vNextApiVersion'] || '/v1.0',
|
|
||||||
interbankTransfers: window['env']['interbankTransfers'] || false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Server URL
|
// Server URL
|
||||||
|
|||||||
Reference in New Issue
Block a user