/// <summary>
        /// Attempt discovery using the supplied parameters. If msisdn, mcc and mnc are null the result will be operator selection, otherwise valid parameters will result in a StartAuthorization status
        /// </summary>
        /// <param name="request">Originating web request</param>
        /// <param name="msisdn">MSISDN from user</param>
        /// <param name="mcc">Mobile Country Code</param>
        /// <param name="mnc">Mobile Network Code</param>
        /// <param name="shouldProxyCookies">If cookies from the original request should be sent onto the discovery service</param>
        /// <param name="options">Optional parameters</param>
        /// <returns>MobileConnectStatus object with required information for continuing the mobileconnect process</returns>
        public async Task <MobileConnectStatus> AttemptDiscoveryAsync(HttpRequestMessage request, string msisdn, string mcc, string mnc, bool shouldProxyCookies, MobileConnectRequestOptions options)
        {
            options.ClientIP = string.IsNullOrEmpty(options.ClientIP) ? request.GetClientIp() : options.ClientIP;

            var cookies = shouldProxyCookies ? request.GetCookies() : null;

            return(await CacheIfRequired(await MobileConnectInterfaceHelper.AttemptDiscovery(_discovery, msisdn, mcc, mnc, cookies, _config, options)));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Attempt discovery using the supplied parameters. If msisdn, mcc and mnc are null the result will be
 /// operator selection, otherwise valid parameters will result in a StartAuthorization status
 /// </summary>
 /// <param name="msisdn">MSISDN from user</param>
 /// <param name="mcc">Mobile Country Code</param>
 /// <param name="mnc">Mobile Network Code</param>
 /// <param name="options">Optional parameters</param>
 /// <returns>MobileConnectStatus object with required information for continuing the mobileconnect process</returns>
 public async Task <MobileConnectStatus> AttemptDiscoveryAsync(
     string msisdn, string mcc, string mnc, MobileConnectRequestOptions options)
 {
     return(await MobileConnectInterfaceHelper.AttemptDiscovery(
                _discovery, msisdn, mcc, mnc, null, _config, options));
 }