https://github.com/drogonframework/drogon-assist
A 3rd party toolkit for the Drogon web framework
https://github.com/drogonframework/drogon-assist
Last synced: 10 months ago
JSON representation
A 3rd party toolkit for the Drogon web framework
- Host: GitHub
- URL: https://github.com/drogonframework/drogon-assist
- Owner: drogonframework
- License: bsd-3-clause
- Created: 2021-05-10T08:41:57.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-02T21:30:20.000Z (over 1 year ago)
- Last Synced: 2025-03-27T06:05:36.051Z (11 months ago)
- Language: C++
- Size: 30.3 KB
- Stars: 15
- Watchers: 8
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Drogon Assist
Drogon Assist is a 3rd party toolkit (even though the author is a maintainer of Drogon) for features that doesn't make it into Drogon's repository. Either because it is out of scope for the core framework, too much dependency or just because.
Dependencies:
* libbsd (if not on *BSD)
* Botan-2
**Note:** This library is in early development. The APIs may change without prior notice
**Note:** You need to recompile this library after any update to Drogon. Otherwise ABI incompatablity may cause unexpected issues.
## Features
* Password hashing
* BasicAuth parsing
* [HTTP Signature][http_signature] genration and verifing (RSA only)
* SHA3/Blake2b hash
* Auxiliary Plugins
## Example
### Easy Password Hashing
```c++
#include
std::string hashed = drassist::passwdhash::hash("12456");
// ARGON2:QrrB8NQCF5JlfWoA:$argon2id$v=19$m=65536,t=2,p=1$+HCM3JuBVPkeF3QiGo7PdA$zIOLPhwKVdSCUfMtq1zd+rCJ9DSMVhkSV+43TRUGtLw
drassist::passwdhash::verify("123456", hashed); // true
drassist::passwdhash::verify("abcdef", hashed); // false
```
### Useful Plugins
* Stop HTTP parameter pollution
```json
/*Add this into Drogon's configuration file*/
{
"name": "drassist::ParameterPollutionProtector",
}
```
* Remove BOM from common content types
```json
/*Add this into Drogon's configuration file*/
{
"name": "drassist::BOMRemover",
}
```
[http_signature]: https://tools.ietf.org/id/draft-cavage-http-signatures-01.html