public static AuthorizerInternalClient ProvideAuthClient(Environment environment) { string endpointAddress = string.Empty; endpointAddress = UrlProvider.ProvideForAuth(environment); AuthorizerInternalClient client = new AuthorizerInternalClient(endpointAddress); return(client); }
public static Ident TestLogin(string loginname, string password, VueTOView.Common.Environment environment) { Ident ident = null; AuthorizerInternalClient client = ClientProvider.ProvideAuthClient(environment); Task <ServiceReference1.ResultOfIdentvcrQC78O> task = client.LoginAsync(loginname, password); ResultOfIdentvcrQC78O result = task.Result; if ((result != null) && string.IsNullOrEmpty(result.Error) && (result.Data != null)) { ident = result.Data as Ident; } return(ident); }
private static Ident LoginFromService(LoginRequest loginRequest) { Ident ident = null; AuthorizerInternalClient client = ClientProvider.ProvideAuthClient(loginRequest.Environment); Task <ServiceReference1.ResultOfIdentvcrQC78O> task = client.LoginAsync(loginRequest.Loginname, loginRequest.Password); ResultOfIdentvcrQC78O result = task.Result; if ((result != null) && string.IsNullOrEmpty(result.Error) && (result.Data != null)) { ident = result.Data as Ident; } return(ident); }