コード例 #1
0
        private void InitManagers()
        {
            // Init Resource Managers
            FoldersManager                = new BoxFoldersManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            FilesManager                  = new BoxFilesManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            CommentsManager               = new BoxCommentsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            CollaborationsManager         = new BoxCollaborationsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            SearchManager                 = new BoxSearchManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            EventsManager                 = new BoxEventsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            UsersManager                  = new BoxUsersManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            GroupsManager                 = new BoxGroupsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            RetentionPoliciesManager      = new BoxRetentionPoliciesManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            MetadataManager               = new BoxMetadataManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            WebhooksManager               = new BoxWebhooksManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            RecentItemsManager            = new BoxRecentItemsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            TasksManager                  = new BoxTasksManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            SharedItemsManager            = new BoxSharedItemsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            CollectionsManager            = new BoxCollectionsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            DevicePinManager              = new BoxDevicePinManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            WebLinksManager               = new BoxWebLinksManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            LegalHoldPoliciesManager      = new BoxLegalHoldPoliciesManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            CollaborationWhitelistManager = new BoxCollaborationWhitelistManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            TermsOfServiceManager         = new BoxTermsOfServiceManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            MetadataCascadePolicyManager  = new BoxMetadataCascadePolicyManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            StoragePoliciesManager        = new BoxStoragePoliciesManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);

            // Init Resource Plugins Manager
            ResourcePlugins = new BoxResourcePlugins();
        }
コード例 #2
0
        public static bool ValidateWebhookSignatures(HttpRequest req, IConfigurationRoot config, string requestBody)
        {
            var deliveryTimestamp  = req.Headers[BOX_DELIVERY_TIMESTAMP_HEADER];
            var signaturePrimary   = req.Headers[BOX_SIGNATURE_PRIMARY_HEADER];
            var signatureSecondary = req.Headers[BOX_SIGNATURE_SECONDARY_HEADER];
            var primaryKey         = config[BOX_WEBHOOK_PRIMARY_KEY_KEY];
            var secondaryKey       = config[BOX_WEBHOOK_SECONDARY_KEY_KEY];

            return(BoxWebhooksManager.VerifyWebhook(deliveryTimestamp, signaturePrimary, signatureSecondary, requestBody, primaryKey, secondaryKey));
        }
コード例 #3
0
        private void InitManagers()
        {
            // Init Resource Managers
            FoldersManager           = new BoxFoldersManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            FilesManager             = new BoxFilesManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            CommentsManager          = new BoxCommentsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            CollaborationsManager    = new BoxCollaborationsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            SearchManager            = new BoxSearchManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            EventsManager            = new BoxEventsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            UsersManager             = new BoxUsersManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            GroupsManager            = new BoxGroupsManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            RetentionPoliciesManager = new BoxRetentionPoliciesManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            MetadataManager          = new BoxMetadataManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);
            WebhooksManager          = new BoxWebhooksManager(Config, _service, _converter, Auth, _asUser, _suppressNotifications);

            // Init Resource Plugins Manager
            ResourcePlugins = new BoxResourcePlugins();
        }