/// <summary>
        /// Adds the sensenet registration feature to the service collection.
        /// </summary>
        /// <param name="appBuilder">AuthenticationBuilder instance.</param>
        /// <param name="configure">Optional configuration method.</param>
        /// <returns>A <see cref="SenseNetRegistrationBuilder"/> instance that lets developers
        /// add custom features to the registration process.</returns>
        public static SenseNetRegistrationBuilder AddSenseNetRegistration(this AuthenticationBuilder appBuilder,
                                                                          Action <RegistrationOptions> configure)
        {
            var options = new RegistrationOptions();

            configure?.Invoke(options);

            var store = new RegistrationProviderStore(options);

            appBuilder.Services.AddSingleton(store);

            // return a feature-specific builder that contains the registered singleton provider store
            return(new SenseNetRegistrationBuilder(appBuilder, store));
        }
 public DefaultRegistrationProvider(IOptions <RegistrationOptions> options, ILogger <DefaultRegistrationProvider> logger)
 {
     _options = options?.Value ?? new RegistrationOptions();
     _logger  = logger;
 }
 public RegistrationProviderStore(RegistrationOptions options)
 {
     DefaultProvider.DefaultGroups   = options.Groups;
     DefaultProvider.DefaultUserType = options.UserType;
 }
 public DefaultRegistrationProvider(IOptions <RegistrationOptions> options)
 {
     _options = options?.Value ?? new RegistrationOptions();
 }