vkoori / pgp by vkoori

This package is used for communication between laravel/lumen services.
760
0
1
Package Data
Maintainer Username: vkoori
Maintainer Contact: kooroshsafeashrafi@gmail.com (Koorosh SafeAshrafi)
Package Create Date: 2023-03-23
Package Last Update: 2023-05-19
Language: PHP
License: Unknown
Last Refreshed: 2024-12-24 15:09:32
Package Statistics
Total Downloads: 760
Monthly Downloads: 4
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Installation

composer require vkoori/pgp

Setting

You need to add the following to the env file:

JWT_BLACK_LIST=false
JWT_KEY=secret
JWT_ALGO=HS256
JWT_MAX_AGE=3600
JWT_LEEWAY=0

When you want to send a request to a service, set the received value in the request header according to the following code:

\Kooriv\PGP\Send::header();

If you are the recipient of the request, use the following class to middleware.

\Kooriv\PGP\Middlewares\JWT::class

If you are the recipient of the request and want to recognize the sender of the request, use the following code:

\Kooriv\PGP\Receive::serviceName();

Warning

When sending a request, the APP_NAME value is sent in the payload. So make sure the .env file values are correct.