Hello Readers,
Steps to configure secondary email as OTP:
Demo video:
http://www.idmfun.com/2016/07/oaam-11g-r2-ps3-secondary-email-otp_1.html
1. Create custom challenge processor.
2. Create a class which extends "AbstractUMSOTPChallengeProcessor" as shown below.
import com.bharosa.uio.processor.challenge.AbstractUMSOTPChallengeProcessor;
import com.bharosa.uio.util.UIOSessionData;
import com.bharosa.uio.util.UIOUtil;
import java.util.ArrayList;
import java.util.List;
import oracle.ucs.messaging.ws.types.Address;
import oracle.ucs.messaging.ws.types.DeliveryType;
public class Email2ChallengeProcessor extends AbstractUMSOTPChallengeProcessor
{
protected List<Address> getRecipients(UIOSessionData sessionData)
{
String toAddress = UIOUtil.getContactInfo(sessionData, "email2");
Address recipientAddr = getAddress(toAddress, DeliveryType.EMAIL);
List<Address> retList = new ArrayList<Address>();
retList.add(recipientAddr);
return retList;
}
}
3. Build jar file with the above java class file and place it in oracle.oaam.extensions.war lib folder.
4. Add below list of properties in oaam_custom.properties file in oracle.oaam.extensions.war
# Second Email Address Input Registration Field Properties Example
bharosa.uio.default.userinfo.inputs.enum.email2=2002
bharosa.uio.default.userinfo.inputs.enum.email2.name=Email Address 2
bharosa.uio.default.userinfo.inputs.enum.email2.description=Email Address 2
bharosa.uio.default.userinfo.inputs.enum.email2.inputname=email2
bharosa.uio.default.userinfo.inputs.enum.email2.inputtype=text
bharosa.uio.default.userinfo.inputs.enum.email2.maxlength=40
bharosa.uio.default.userinfo.inputs.enum.email2.required=true
bharosa.uio.default.userinfo.inputs.enum.email2.order=2
bharosa.uio.default.userinfo.inputs.enum.email2.enabled=true
bharosa.uio.default.userinfo.inputs.enum.email2.regex=.+@[a-zA-Z_]+?\.[a-zA-Z.]+
bharosa.uio.default.userinfo.inputs.enum.email2.errorCode=otp.invalid.email
bharosa.uio.default.userinfo.inputs.enum.email2.managerClass=com.bharosa.uio.manager.user.DefaultContactInfoManager
bharosa.uio.default.userinfo.inputs.enum.email2.verify=true
#bharosa.uio.default.userinfo.inputs.enum.email2.displaymask=.{1,2}(.*)@([a-zA-Z_]+)?\.[a-zA-Z]{2,3}
# Second Email Address Challenge OTP Field Properties Example
bharosa.uio.default.challenge.type.enum.ChallengeEmail2=2003
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.available=true
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.description=Challenge Email 2
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.displayedInfo=email2
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.enabled=true
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.htmlInputType=text
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.htmlLabel=Email Code
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.name=Email Challenge2
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.otp=true
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.otpexpirytimeMs=400000
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.processor=Email2ChallengeProcessor
bharosa.uio.default.challenge.type.enum.ChallengeEmail2.requiredInfo=email
# Rule action for ChallengeEmail2
rule.action.enum.ChallengeEmail2=1091
rule.action.enum.ChallengeEmail2.name=Challenge Email 2
rule.action.enum.ChallengeEmail2.description=Challenge the user using Email
rule.action.enum.ChallengeEmail2.otp=true
5. Redeploy oracle.oaam.extensions.war file in both oaam admin & oaam server managed servers.
6. Login to OAAM admin console
7. Navigate to Groups and click on "OAAM Challenge Choice" and click on "Actions" tab.
8. Add newly created action called "Challenge Email 2".
9. Now, login to TAP protected application by registering new user with 2 OTP email addresses.
10. Test login with user account who registered primary & secondary email address.
-- Siva Pokuri.