private static void getOOBInfo(String userId) { //query the service for OOB credentials vipQueryClient = new vipUserQuerySvcClient(); ArrayList userOOBList = vipQueryClient.getOOBInfo(userId); foreach (Object obj in userOOBList) { string[] tokenString = obj.ToString().Split(new char[] { '^' }); switch (tokenString[0]) { case "SMS": if (tokenString[1].Equals("not present")) { smsName = "SMS Credential not present!"; smsNumber = "Phone number not present!"; } else { smsName = tokenString[1]; smsNumber = tokenString[2]; } break; case "Voice": if (tokenString[1].Equals("not present")) { voiceName = "Voice Credential not present!"; voiceNumber = "Phone number not present!"; } else { voiceName = tokenString[1]; voiceNumber = tokenString[2]; } break; default: break; } } }
private static void getUserInfo(String userId) { vipQueryClient = new vipUserQuerySvcClient(); ArrayList userInfoList = vipQueryClient.getUserInfo(userId); //clean-up the existing list of ids credentialId.Clear(); credentialName.Clear(); credentialType.Clear(); credentialLastUsed.Clear(); credentialStatus.Clear(); foreach (Object obj in userInfoList) { string[] tokenString = obj.ToString().Split(new char[] { '^' }); switch (tokenString[0]) { case "requestId": requestId = tokenString[1]; break; case "requestTime": requestTime = tokenString[1]; break; case "requestStatus": requestStatus = tokenString[1]; break; case "userName": userIdentifier = tokenString[1]; break; case "userStatus": userStatus = tokenString[1]; break; case "userPin": userPin = tokenString[1]; break; case "credentialId1": credentialId.Add(tokenString[1]); break; case "credentialId2": credentialId.Add(tokenString[1]); break; case "credentialId3": credentialId.Add(tokenString[1]); break; case "credentialId4": credentialId.Add(tokenString[1]); break; case "credentialId5": credentialId.Add(tokenString[1]); break; case "credentialName1": credentialName.Add(tokenString[1]); break; case "credentialName2": credentialName.Add(tokenString[1]); break; case "credentialName3": credentialName.Add(tokenString[1]); break; case "credentialName4": credentialName.Add(tokenString[1]); break; case "credentialName5": credentialName.Add(tokenString[1]); break; case "credentialType1": credentialType.Add(tokenString[1]); break; case "credentialType2": credentialType.Add(tokenString[1]); break; case "credentialType3": credentialType.Add(tokenString[1]); break; case "credentialType4": credentialType.Add(tokenString[1]); break; case "credentialType5": credentialType.Add(tokenString[1]); break; case "credentialStatus1": credentialStatus.Add(tokenString[1]); break; case "credentialStatus2": credentialStatus.Add(tokenString[1]); break; case "credentialStatus3": credentialStatus.Add(tokenString[1]); break; case "credentialStatus4": credentialStatus.Add(tokenString[1]); break; case "credentialStatus5": credentialStatus.Add(tokenString[1]); break; case "credentialUsed1": credentialLastUsed.Add(tokenString[1]); break; case "credentialUsed2": credentialLastUsed.Add(tokenString[1]); break; case "credentialUsed3": credentialLastUsed.Add(tokenString[1]); break; case "credentialUsed4": credentialLastUsed.Add(tokenString[1]); break; case "credentialUsed5": credentialLastUsed.Add(tokenString[1]); break; default: break; } } }