Example #1
0
        public BoxDestination(IBoxConfiguration boxConfiguration, IBoxLanguage boxLanguage)
        {
            _boxConfiguration = boxConfiguration;
            _boxLanguage      = boxLanguage;

            _oauth2Settings = new OAuth2Settings
            {
                AuthorizationUri = new Uri("https://app.box.com").
                                   AppendSegments("api", "oauth2", "authorize").
                                   ExtendQuery(new Dictionary <string, string>
                {
                    { "response_type", "code" },
                    { "client_id", "{ClientId}" },
                    { "redirect_uri", "{RedirectUrl}" },
                    { "state", "{State}" }
                }),
                TokenUrl         = new Uri("https://api.box.com/oauth2/token"),
                CloudServiceName = "Box",
                ClientId         = boxConfiguration.ClientId,
                ClientSecret     = boxConfiguration.ClientSecret,
                RedirectUrl      = "https://www.box.com/home/",
                AuthorizeMode    = AuthorizeModes.EmbeddedBrowser,
                Token            = boxConfiguration
            };
        }
Example #2
0
        public BoxDestination(
            ICoreConfiguration coreConfiguration,
            IGreenshotLanguage greenshotLanguage,
            IBoxConfiguration boxConfiguration,
            IBoxLanguage boxLanguage,
            Func <CancellationTokenSource, Owned <PleaseWaitForm> > pleaseWaitFormFactory,
            INetworkConfiguration networkConfiguration,
            IResourceProvider resourceProvider) : base(coreConfiguration, greenshotLanguage)
        {
            _boxConfiguration      = boxConfiguration;
            _boxLanguage           = boxLanguage;
            _pleaseWaitFormFactory = pleaseWaitFormFactory;
            _networkConfiguration  = networkConfiguration;
            _resourceProvider      = resourceProvider;

            _oauth2Settings = new OAuth2Settings
            {
                AuthorizationUri = new Uri("https://app.box.com").
                                   AppendSegments("api", "oauth2", "authorize").
                                   ExtendQuery(new Dictionary <string, string>
                {
                    { "response_type", "code" },
                    { "client_id", "{ClientId}" },
                    { "redirect_uri", "{RedirectUrl}" },
                    { "state", "{State}" }
                }),
                TokenUrl         = new Uri("https://api.box.com/oauth2/token"),
                CloudServiceName = "Box",
                ClientId         = boxConfiguration.ClientId,
                ClientSecret     = boxConfiguration.ClientSecret,
                RedirectUrl      = "https://www.box.com/home/",
                AuthorizeMode    = AuthorizeModes.EmbeddedBrowser,
                Token            = boxConfiguration
            };
        }
Example #3
0
 public BoxConfigViewModel(
     IBoxConfiguration boxConfiguration,
     IBoxLanguage boxLanguage,
     IGreenshotLanguage greenshotLanguage,
     FileConfigPartViewModel fileConfigPartViewModel
     )
 {
     BoxConfiguration        = boxConfiguration;
     BoxLanguage             = boxLanguage;
     GreenshotLanguage       = greenshotLanguage;
     FileConfigPartViewModel = fileConfigPartViewModel;
 }