Esempio n. 1
0
        /// <summary>
        /// Configures bulk operation support for the SCIM service provider.
        /// </summary>
        /// <param name="supported">if set to <c>true</c> [supported].</param>
        /// <param name="maxOperations">The maximum operations.</param>
        /// <param name="maxPayloadSizeInBytes">The maximum payload size in bytes.</param>
        /// <returns>ScimServerConfiguration.</returns>
        public ScimServerConfiguration ConfigureBulk(bool supported = true, int maxOperations = ScimConstants.Defaults.BulkMaxOperations, int maxPayloadSizeInBytes = ScimConstants.Defaults.BulkMaxPayload)
        {
            _Features[ScimFeatureType.Bulk] = supported
                ? ScimFeatureBulk.Create(maxOperations, maxPayloadSizeInBytes)
                : ScimFeatureBulk.CreateUnsupported();

            return(this);
        }
Esempio n. 2
0
 protected override ServiceProviderConfiguration CreateServiceProviderConfiguration()
 {
     return(new ServiceProviderConfiguration1(
                new ScimFeature(false),
                ScimFeatureBulk.CreateUnsupported(),
                ServerConfiguration.GetFeature <ScimFeatureFilter>(ScimFeatureType.Filter),
                ServerConfiguration.GetFeature(ScimFeatureType.ChangePassword),
                ServerConfiguration.GetFeature(ScimFeatureType.Sort),
                ServerConfiguration.GetFeature <ScimFeatureETag>(ScimFeatureType.ETag),
                ServerConfiguration.AuthenticationSchemes));
 }
Esempio n. 3
0
        private IDictionary <ScimFeatureType, ScimFeature> CreateDefaultFeatures()
        {
            var features = new Dictionary <ScimFeatureType, ScimFeature>
            {
                { ScimFeatureType.Patch, new ScimFeature(true) },
                { ScimFeatureType.Bulk, ScimFeatureBulk.Create(ScimConstants.Defaults.BulkMaxOperations, ScimConstants.Defaults.BulkMaxPayload) },
                { ScimFeatureType.Filter, ScimFeatureFilter.Create(ScimConstants.Defaults.FilterMaxResults) },
                { ScimFeatureType.ChangePassword, new ScimFeature(true) },
                { ScimFeatureType.Sort, new ScimFeature(true) },
                { ScimFeatureType.ETag, new ScimFeatureETag(true, true) }
            };

            return(features);
        }
Esempio n. 4
0
 public ServiceProviderConfiguration1(
     ScimFeature featurePatch,
     ScimFeatureBulk featureBulk,
     ScimFeatureFilter featureFilter,
     ScimFeature featureChangePassword,
     ScimFeature featureSort,
     ScimFeatureETag featureETag,
     IEnumerable <AuthenticationScheme> authenticationSchemes = null)
 {
     Bulk                  = featureBulk ?? ScimFeatureBulk.CreateUnsupported();
     Filter                = featureFilter ?? ScimFeatureFilter.CreateUnsupported();
     Patch                 = featurePatch;
     ChangePassword        = featureChangePassword;
     Sort                  = featureSort;
     ETag                  = featureETag;
     AuthenticationSchemes = authenticationSchemes == null
         ? new List <AuthenticationScheme>()
         : authenticationSchemes.ToList();
 }
 public ServiceProviderConfiguration2(
     ScimFeature featurePatch, 
     ScimFeatureBulk featureBulk, 
     ScimFeatureFilter featureFilter, 
     ScimFeature featureChangePassword, 
     ScimFeature featureSort, 
     ScimFeatureETag featureETag, 
     IEnumerable<AuthenticationScheme> authenticationSchemes = null)
 {
     Bulk = featureBulk ?? ScimFeatureBulk.CreateUnsupported();
     Filter = featureFilter ?? ScimFeatureFilter.CreateUnsupported();
     Patch = featurePatch;
     ChangePassword = featureChangePassword;
     Sort = featureSort;
     ETag = featureETag;
     AuthenticationSchemes = authenticationSchemes == null
         ? new List<AuthenticationScheme>()
         : authenticationSchemes.ToList();
 }