public HomeViewModel(IAuthenticationModel modelAuth) { _modelAuth = modelAuth; _modelAuth.LoadUserComplete += new EventHandler <LoadUserOperationEventArgs>(_modelAuth_LoadUserComplete); _modelAuth.GetListAuthenticationMenuComplete += new EventHandler <ComplexResultsArgs <Authentication> >(_modelAuth_GetListAuthenticationMenuComplete); _modelAuth.LogoutComplete += new EventHandler <LogoutOperationEventArgs>(_modelAuth_LogoutComplete); }
public HomeViewModel(IAuthenticationModel modelAuth) { _modelAuth = modelAuth; _modelAuth.LoadUserComplete += new EventHandler<LoadUserOperationEventArgs>(_modelAuth_LoadUserComplete); _modelAuth.GetListAuthenticationMenuComplete += new EventHandler<ComplexResultsArgs<Authentication>>(_modelAuth_GetListAuthenticationMenuComplete); _modelAuth.LogoutComplete += new EventHandler<LogoutOperationEventArgs>(_modelAuth_LogoutComplete); }
public override void Cleanup() { if (_modelAuth != null) { _modelAuth.ChangePasswordComplete -= new EventHandler <InvokeOperationEventArgs>(_modelAuth_ChangePasswordComplete); _modelAuth = null; } if (DialogSended != null) { DialogSended = null; } base.Cleanup(); }
public override void Cleanup() { if (_modelAuth != null) { _modelAuth.LoginComplete -= new EventHandler <LoginOperationEventArgs>(_modelAuth_LoginComplete); _modelAuth = null; } _itemEdit = null; if (_dialogSended != null) { _dialogSended = null; } base.Cleanup(); }
/// <summary> /// Get an oAuth token for a given user account /// </summary> /// <param name="user"></param> /// <param name="password"></param> /// <returns></returns> private static async Task <TokenModel> getToken(IAuthenticationModel authModel) { using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Base64Encode(clientId + ":" + secret)); var content = new FormUrlEncodedContent(authModel.ToDictionary()); HttpResponseMessage response = await client.PostAsync(new Uri(oAuthTokenEndPoint), content); return((await handleResponse <TokenModel>(response)).Content); } }
public override void Cleanup() { if (_modelAuth != null) { _modelAuth.LoadUserComplete -= new EventHandler <LoadUserOperationEventArgs>(_modelAuth_LoadUserComplete); _modelAuth.GetListAuthenticationMenuComplete -= new EventHandler <ComplexResultsArgs <Authentication> >(_modelAuth_GetListAuthenticationMenuComplete); _modelAuth.LogoutComplete -= new EventHandler <LogoutOperationEventArgs>(_modelAuth_LogoutComplete); _modelAuth = null; } ListAuth = null; if (DialogSended != null) { DialogSended = null; } base.Cleanup(); }
public override void Cleanup() { if (_modelAuth != null) { _modelAuth.LoadUserComplete -= new EventHandler<LoadUserOperationEventArgs>(_modelAuth_LoadUserComplete); _modelAuth.GetListAuthenticationMenuComplete -= new EventHandler<ComplexResultsArgs<Authentication>>(_modelAuth_GetListAuthenticationMenuComplete); _modelAuth.LogoutComplete -= new EventHandler<LogoutOperationEventArgs>(_modelAuth_LogoutComplete); _modelAuth = null; } ListAuth = null; if (DialogSended != null) DialogSended = null; base.Cleanup(); }
public RestSharpCommon(string baseUrl, IAuthenticationModel authenticationModel = null) { _baseUrl = baseUrl; _authenticationModel = authenticationModel; }
public override void Cleanup() { if (_modelAuth != null) { _modelAuth.LoginComplete -= new EventHandler<LoginOperationEventArgs>(_modelAuth_LoginComplete); _modelAuth = null; } _itemEdit = null; if (_dialogSended != null) _dialogSended = null; base.Cleanup(); }
public LoginViewModel(IAuthenticationModel modelAuth) { _modelAuth = modelAuth; _modelAuth.LoginComplete += new EventHandler<LoginOperationEventArgs>(_modelAuth_LoginComplete); }
public MainPageViewModel(IAuthenticationModel modelAuth, ITrainingModel modelTrain, ISettingModel modelSetting) { _modelAuth = modelAuth; _modelTrain = modelTrain; _modelSetting = modelSetting; }
public ChangePasswordViewModel(IAuthenticationModel modelAuth) { _modelAuth = modelAuth; _modelAuth.ChangePasswordComplete += new EventHandler <InvokeOperationEventArgs>(_modelAuth_ChangePasswordComplete); }
public override void Cleanup() { if (_modelAuth != null) { _modelAuth.ChangePasswordComplete -= new EventHandler<InvokeOperationEventArgs>(_modelAuth_ChangePasswordComplete); _modelAuth = null; } if (DialogSended != null) DialogSended = null; base.Cleanup(); }
public ChangePasswordViewModel(IAuthenticationModel modelAuth) { _modelAuth = modelAuth; _modelAuth.ChangePasswordComplete += new EventHandler<InvokeOperationEventArgs>(_modelAuth_ChangePasswordComplete); }
public LoginViewModel(IAuthenticationModel modelAuth) { _modelAuth = modelAuth; _modelAuth.LoginComplete += new EventHandler <LoginOperationEventArgs>(_modelAuth_LoginComplete); }
public AppContext(IAuthenticationModel authModel) { _authModel = authModel; }