Exemplo n.º 1
0
        private static SMRequest ConstructSMRequest(Verification verification)
        {
            SMRequest request = new SMRequest();
            request.verification = verification;

            return request;
        }
Exemplo n.º 2
0
        public static async Task<Verification> validateSMSVerificationCode(User user, Verification verification)
        {
            User tempUser = new User();
            tempUser.id = user.id;

            string route = !String.IsNullOrEmpty(tempUser.id) ? APIRoutes.validateVerificationIdWithUserIdRoute(tempUser.id, verification.id.ToString()) :
                                                                APIRoutes.validateVerificationIdWithExternalIdRoute(tempUser.external_id, verification.id.ToString());

            SMResponse m = await AsyncClient.post(route, ConstructSMRequest(verification));
            return m == null ? null : m.GetVerificationResponseModel();

        }