예제 #1
0
        public async Task <UpsertResponse <IdentityProvider> > UpsertIdentityProviderAsync(IdentityProvider identityProvider, string eTag, CancellationToken cancellationToken)
        {
            EnsureArg.IsNotNull(identityProvider, nameof(identityProvider));

            var validationResults = new List <ValidationResult>();

            if (!Validator.TryValidateObject(identityProvider, new ValidationContext(identityProvider), validationResults))
            {
                throw new InvalidDefinitionException(
                          Resources.IdentityProviderDefinitionIsInvalid,
                          validationResults);
            }

            return(await _controlPlaneDataStore.UpsertIdentityProviderAsync(identityProvider, eTag, cancellationToken));
        }
예제 #2
0
        public async Task <IdentityProvider> UpsertIdentityProviderAsync(IdentityProvider identityProvider, CancellationToken cancellationToken)
        {
            EnsureArg.IsNotNull(identityProvider, nameof(identityProvider));

            return(await _controlPlaneDataStore.UpsertIdentityProviderAsync(identityProvider, cancellationToken));
        }