1.0.1 • Published 12 months ago

rpsauth v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

RPSAuth - Rock-Paper-Scissor Authentication

This project is an implentation of the RPSAuth protocol as an Express Middleware. The RPSAuth is based on the Rock-Paper-Scissor game. The server can only fulfill the request of the Client, if the Client has a winning hand over the Server and wins the current authentication round. To provide extra protection, in case of a tie, the Client still loses the round.

Usage

const express = require("express");
const rpsAuth = require("rpsAuth");

const app = express();

app.use(rpsAuth);

app.get("/", (req, res) => {
 // ...c'mon do something
})

Then the Client simply needs to set the chosen hand in the Authorization header.

Valid hands are:

  • rock
  • paper
  • scissor
1.0.1

12 months ago

1.0.0

12 months ago