Skip to content

Commit 16cb92a

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 6e730c8 + ef3873d commit 16cb92a

4 files changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/minlinter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
find . -name '.pytest_cache' -delete
4040
find . -name '.coverage' -delete
4141
find . -name 'coverage.xml' -delete
42-
find . -name 'htmlcov' -type d -exec rm -rf {} +
42+
find . -name 'htmlcov' -type d -exec rm -rf {} +

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ First off, thanks for taking the time to contribute!
44

55
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
66

7+
This project also participates in Hacktoberfest, so your contributions will count towards your pull request total.
8+
79
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
810
> - Star the project
911
> - Tweet about it

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,29 @@ import easy_mongodb_auth_handler as emdb
503503
- **Returns:**
504504
- `bool`: `True` if the email format is valid, `False` otherwise.
505505

506+
- **emdb.hash_password(password)**
507+
- Hashes a password.
508+
- **Parameters:**
509+
- `password` (`str`): The password to hash.
510+
- **Returns:**
511+
- `str`: The hashed password.
512+
513+
- **emdb.check_password(user, password)**
514+
- Checks a un-hashed password against the hashed password stored in the user document.
515+
- **Parameters:**
516+
- `user` (`dict`): The user document to authenticate.
517+
- `password` (`str`): The un-hashed password to check against the user document.
518+
- **Returns:**
519+
- `bool`: `True` if the passwords match and `False` otherwise.
520+
521+
- **emdb.verify_password(password, hashed)**
522+
- Checks a un-hashed password against the hashed password passed as a parameter.
523+
- **Parameters:**
524+
- `password` (`dict`): The un-hashed password to check.
525+
- `hashed` (`str`): The hashed password to check.
526+
- **Returns:**
527+
- `bool`: `True` if the passwords match and `False` otherwise.
528+
506529
## Requirements
507530

508531
- Python >= 3.9

src/easy_mongodb_auth_handler/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
from .utils import Utils
88
from .core_db import CoreDB
99
from .package_functions.message import get_messages
10-
from .package_functions.func import generate_secure_code, get_version, validate_email
10+
from .package_functions.func import (generate_secure_code, get_version, validate_email,
11+
check_password, hash_password, verify_password)

0 commit comments

Comments
 (0)