public async Task <ProviderResult> Login(ISecurityCheckDelegate checkDelegate, string scopeSecurity, JObject challengeRequest) { ProviderResult result = new ProviderResult(); this.SecurityChallenge = new SecurityChallengeHandler(scopeSecurity, challengeRequest); this.SecurityChallenge.eventSuccessHandler += checkDelegate.AuthenticationSucessEventHandle; this.SecurityChallenge.eventHandleFailure += checkDelegate.AuthenticationFailureEventHandle; this.SecurityChallenge.ShouldCancel(); this.client.RegisterChallengeHandler(this.SecurityChallenge); this.client.AuthorizationManager.SetLoginTimeOut(this.Timeout); try { await MobileFirstHelper.Instance.GetSemaphore().WaitAsync(); } catch (ObjectDisposedException) { MobileFirstHelper.Instance.DisponseSemaphore(); await MobileFirstHelper.Instance.GetSemaphore().WaitAsync(); } var resultChallenge = await this.client.AuthorizationManager.Login(scopeSecurity, challengeRequest); result.Success = resultChallenge.Success; result.Message = resultChallenge.Message; result.CodeStatus = resultChallenge.HTTPStatus; result.Response = JsonConvert.SerializeObject(resultChallenge.ResponseJSON); MobileFirstHelper.Instance.GetSemaphore().Release(); return(result); }
public Task <ProviderResult> Login(ISecurityCheckDelegate checkDelegate, string scopeSecurity, JObject challengeRequest) { throw new NotImplementedException(); }