<commit_before>BaseXRealm
==========

A custom realm for Tomcat where user can be stored in a BaseX collection

### Installation

* Download the project from my Github account

* Add All JAR file from <TOMCAT_HOME>/lib/ to the Java Build Path of the project

* Export the project as JAR File (don't choose the Runnable JAR File) and don't export the PasswordGenerator.java, it's only used for generating the passwords.

* Move the generated JAR file to <TOMCAT_HOME>/lib/.
* Create a BaseX collection like the one below (you can use the PasswordGenerator.java to generate the salt and the hashed password)

The collection that store the users has the following structure:
```xml
    <user>
        <username>USERNAME</username>
        <password>PASSWORD</password>
        <salt>SALT</salt>
        <roles>
            <role>ROLE_1</role>
            <role>ROLE_2</role>
        </roles>
    </user>
```<commit_msg>Installation<commit_after>BaseXRealm
==========

A custom realm for Tomcat where user can be stored in a BaseX collection

### Installation

* Download the project from my Github account

* Add All JAR file from %TOMCAT_HOME%/lib/ to the Java Build Path of the project

* Export the project as JAR File (don't choose the Runnable JAR File) and don't export the PasswordGenerator.java, it's only used for generating the passwords.

* Move the generated JAR file to %TOMCAT_HOME%/lib/.
* Add [commons-logging](http://commons.apache.org/proper/commons-logging/) to %TOMCAT_HOME%/lib/.
* Create a BaseX collection like the one below (you can use the PasswordGenerator.java to generate the salt and the hashed password)

The collection that store the users has the following structure:
```xml
    <user>
        <username>USERNAME</username>
        <password>PASSWORD</password>
        <salt>SALT</salt>
        <roles>
            <role>ROLE_1</role>
            <role>ROLE_2</role>
        </roles>
    </user>
```
{'fraction_non_alphanumeric': 0.09642301710730948, 'fraction_numerical': 0.002073613271124935, 'mean_word_length': 3.406392694063927, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1578127', 'n_tokens_mistral': 580, 'n_tokens_neox': 550, 'n_words': 222}