Thursday, 20 April 2017

OAM Adaptive authentication Scheme mobile number Masking

By default Adaptive authentication scheme for second factor authentication mobile number (used for OTP) masking works for many numbers and masks them
but in some cases it does not mask some numbers
e.g.

+XX-XXX-XXXXXXX
+XX-XXXXXXXXXX

etc.

So we need to change the OOTB (PhoneMaskRegex) regular expression in the
Adaptive Authentication Module
&
Adaptive Authentication Scheme

\d{1,2}\D?\D?(\d{3})\D?\D?(\d{3})\D?(\d{2})\d{2}

\d{1,2} means any 2 digits can be in the beginning
\D? means it can be any Character
(\d{3}) means any 3 digits and these digits will be masked as *

Incase a character comes in the beginning OOTB RE does not handle it
So according to my situation to handle the above mentioned numbers I modified the OOTB RE

\D?\d{1,2}\D?\D?(\d{3})\D?\D?(\d{3})\D?(\d{2})\d{2,3}

No comments:

Post a Comment