public LoggingIn(MainWindow mainWindow, AuthorizationStructure userInfo) { InitializeComponent(); main = mainWindow; LGThingApi.Communication.LGGateway.LGOAuth.AuthorizationData = userInfo; Loaded += LoggingIn_Loaded; }
/// <summary> /// Parse access and refresh tokens based on response from Oauth Url from <see cref="GetOauthUrl" langword="static">GetOauthUrl</see> /// </summary> /// <param name="response">Response from <see cref="GetOauthUrl" langword="static">GetOauthUrl</see></param> public static void AuthorizeBasedOnOauth(string response) { if (response == null) { throw new InvalidDataException(); } string access = response.Split('=')[1].Split('&')[0]; string refresh = response.Split('=')[2].Split('&')[0]; AuthorizationData = new AuthorizationStructure() { AccessToken = access, RefreshToken = refresh, GrantType = "refresh_token" }; }
public CommandFactory( SubscriptionsModifyOperations subscriptions, AuthorizationStructure authorizationStructure, ISubscriptionFactory subscriptionFactory, SubscriptionDataCorrectnessCriteria dataCorrectnessCriteria, IAssetQueriesFactory assetQueriesFactory, Log log) { _subscriptions = subscriptions; _authorizationStructure = authorizationStructure; _subscriptionFactory = subscriptionFactory; _dataCorrectnessCriteria = dataCorrectnessCriteria; _assetQueriesFactory = assetQueriesFactory; _log = log; }
static void Main(string[] args) { var structure = new AuthorizationStructure(); var dummyLog = new DummyLog(); var api = new Api( new CommandFactory( new Subscriptions.Subscriptions(), structure, new SubscriptionFactory(), new SubscriptionDataCorrectnessCriteria(), new AssetQueriesFactory( structure ), dummyLog ), new DefaultResponseBuilderFactory(), dummyLog ); var response1 = api.StartSubscription(new NewSubscriptionParametersDto()); var response2 = api.StopSubscription(new StoppedSubscriptionParametersDto()); }
public void GoToLogginIn(AuthorizationStructure author) { logIN = new LoggingIn(this, author); _NavigationFrame.Navigate(logIN); }
public IncomingChangeProcessing(ChangeFactory changeFactory, AuthorizationStructure authorizationStructure) { _changeFactory = changeFactory; _authorizationStructure = authorizationStructure; }
public void MakeTo(AuthorizationStructure authorizationStructure) { Console.WriteLine("Create " + authorizationStructure); }