/Patricia-test

an authentication system with RSA encryption (that uses public & private key) and also create an extra protected POST route where only encrypted payload is sent which is then decrypted by the application

Primary LanguagePHP

Contributors Forks Stargazers Issues MIT License


Patricia Test

an authentication system with RSA encryption (that uses public & private key) and also create an extra protected POST route where only encrypted payload is sent which is then decrypted by the application.
Explore the docs �

Report BugRequest Feature

Table of Contents

About The Project

Encryption with RSA

an authentication system with RSA encryption (that uses public & private key) and also create an extra protected POST route where only encrypted payload is sent which is then decrypted by the application.

Built With

This progam was made using this technologies

Getting Started

To get a local copy up and running follow these simple example steps.

Installation

  1. Clone the repo
git clone https://github.com/collinsugwu/Patricia-test
  1. cd in to projects directory
cd Patricia-test
  1. update/install composer
composer install
  1. start the php server
php -S localhost:8000 -t public
  1. Publish the endpoints documentation with DarkaOnline
  php artisan swagger-lume:publish-config

  php artisan swagger-lume:publish-views 

  php artisan swagger-lume:publish

  php artisan swagger-lume:generate
  

Usage

  1. Generate a keyPair(Public and Private key) of key size of 512 bit from Online RSA Key Generator.

  2. create a private_key.pm file and a public_key.pm file in 'storage/keys' folder.

  3. copy the private key generated from 'Online RSA Key Generator' into the private_key.pm file, and also copy the public key generated from the 'Online RSA Key Generator' into the public_key.pem file.

  4. Run the Test command to test all our endpoints

vendor/bin/phpunit
  1. View the endpoints swagger documentaion from this route
localhost:8000/api/documentation

Explanations

The project uses JWT (Json Web Token) for authentication but goes a step further in using RSA encryption for encrypting "and decrypting the token.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/collinsugwu/Patricia-test