<commit_before>MongoMembership
===============

Contain ASP.NET providers for working with Membership, Role, Profile via MongoDB.

* [Nuget](#nuget)
* [Configuration](#configuration)
* [License](#license)

### Nuget
https://nuget.org/packages/MongoMembership

### Configuration
MongoMembership should been added and configured in your Web.config file
```xml          
    <configuration>
	<appSettings>
	    <add key="MONGOLAB_URI" value="mongodb://localhost/MongoLab"/>
	    <add key="MongoUri" value="mongodb://localhost/TestMongoMembershipProvider"/>
	</appSettings>
        <system.web>
            <membership defaultProvider="MongoMembershipProvider">
                <providers>
                     <clear/>
                     <add name="MongoMembershipProvider"
                          type="MongoMembership.Providers.MongoMembershipProvider"
                          connectionStringKeys="MongoUri"
                          enablePasswordRetrieval="false"
                          enablePasswordReset="true"
                          requiresQuestionAndAnswer="false"
                          requiresUniqueEmail="false"
                          maxInvalidPasswordAttempts="5"
                          minRequiredPasswordLength="6"
                          minRequiredNonalphanumericCharacters="0"
                          passwordAttemptWindow="10"
                          applicationName="/" />
                </providers>
            </membership>

            <profile defaultProvider="MongoProfileProvider">
                <providers>
                    <clear/>
                    <add name="MongoProfileProvider"
                         type="MongoMembership.Providers.MongoProfileProvider"
                         connectionStringKeys="MongoUri"
                         applicationName="/" />
                </providers>
            </profile>

            <roleManager defaultProvider="MongoRoleProvider">
                <providers>
                    <clear/>
                    <add name="MongoRoleProvider"
                         type="MongoMembership.Providers.MongoRoleProvider"
                         connectionStringKeys="MongoUri"
                         applicationName="/" />
                </providers>
            </roleManager>
        </system.web>
    </configuration>
```

Please notice
-------------
Each provider have new attribute _connectionStringKeys_ which could contain coma separated keys(links) to the keys in _appSettings_ section. Order of keys is important. Each key in _appSettings_ should be connection string to MongoDB or should absent in config. If no connection string is configured then default: "mongodb://localhost/MongoMembership" will be used.

### License
MongoMembership is free software distributed under the terms of MIT License (see LICENSE.txt) these terms dont apply to other 3rd party tools, utilities or code which may be used to develop this application.

# P.S.
Do not forget to give your feedback about this project.<commit_msg>Updated REAMDE to show Connection Strings in newer format<commit_after>MongoMembership
===============

Contain ASP.NET providers for working with Membership, Role, Profile via MongoDB.

* [Nuget](#nuget)
* [Configuration](#configuration)
* [License](#license)

### Nuget
https://nuget.org/packages/MongoMembership

### Configuration
MongoMembership should been added and configured in your Web.config file
```xml          
    <configuration>
	<connectionStrings>
	    <add name="MONGOLAB_URI" connectionString="mongodb://localhost/MongoLab"/>
	    <add name="MongoUri" connectionString="mongodb://localhost/TestMongoMembershipProvider"/>
	</connectionStrings>
        <system.web>
            <membership defaultProvider="MongoMembershipProvider">
                <providers>
                     <clear/>
                     <add name="MongoMembershipProvider"
                          type="MongoMembership.Providers.MongoMembershipProvider"
                          connectionStringKeys="MongoUri"
                          enablePasswordRetrieval="false"
                          enablePasswordReset="true"
                          requiresQuestionAndAnswer="false"
                          requiresUniqueEmail="false"
                          maxInvalidPasswordAttempts="5"
                          minRequiredPasswordLength="6"
                          minRequiredNonalphanumericCharacters="0"
                          passwordAttemptWindow="10"
                          applicationName="/" />
                </providers>
            </membership>

            <profile defaultProvider="MongoProfileProvider">
                <providers>
                    <clear/>
                    <add name="MongoProfileProvider"
                         type="MongoMembership.Providers.MongoProfileProvider"
                         connectionStringKeys="MongoUri"
                         applicationName="/" />
                </providers>
            </profile>

            <roleManager defaultProvider="MongoRoleProvider">
                <providers>
                    <clear/>
                    <add name="MongoRoleProvider"
                         type="MongoMembership.Providers.MongoRoleProvider"
                         connectionStringKeys="MongoUri"
                         applicationName="/" />
                </providers>
            </roleManager>
        </system.web>
    </configuration>
```

Please notice
-------------
Each provider have new attribute _connectionStringKeys_ which could contain coma separated keys(links) to the keys in _appSettings_ section. Order of keys is important. Each key in _appSettings_ should be connection string to MongoDB or should absent in config. If no connection string is configured then default: "mongodb://localhost/MongoMembership" will be used.

### License
MongoMembership is free software distributed under the terms of MIT License (see LICENSE.txt) these terms don�t apply to other 3rd party tools, utilities or code which may be used to develop this application.

# P.S.
Do not forget to give your feedback about this project.
{'fraction_non_alphanumeric': 0.08682195797361134, 'fraction_numerical': 0.0019547157517510994, 'mean_word_length': 1.942022041207475, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '584657', 'n_tokens_mistral': 1443, 'n_tokens_neox': 1358, 'n_words': 365}