Coder Social home page Coder Social logo

ajunlonglive / drogon-assist Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drogonframework/drogon-assist

0.0 1.0 0.0 28 KB

A 3rd party toolkit for the Drogon web framework

License: BSD 3-Clause "New" or "Revised" License

C++ 95.33% CMake 4.67%

drogon-assist's Introduction

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 frameowrk, 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 genration and verifing (RSA only)
  • SHA3/Blake2b hash
  • Auxiliary Plugins

Example

Easy Password Hashing

#include <drogon/assist/passwdhash.hpp>

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
/*Add this into Drogon's configuration file*/
{
	"name": "drassist::ParameterPollutionProtector",
}
  • Remove BOM from common content types
/*Add this into Drogon's configuration file*/
{
	"name": "drassist::BOMRemover",
}

drogon-assist's People

Contributors

marty1885 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.