vkoori/pgp

This package is used for communication between laravel/lumen services.
794
Install
composer require vkoori/pgp
Latest Version:1.1.0
PHP:>=8.1
Last Updated:May 19, 2023
Links: GitHub  ·  Packagist
Maintainer: vkoori

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(payload:['key' => 'value']);

If you are the recipient of the request, use the following middleware to validate the received request:

\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();

If you are the recipient of the request and want to get all/specific payload, use the following code:

\Kooriv\PGP\Receive::payload();
\Kooriv\PGP\Receive::payload('key');

Warning

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

Related Packages

vkoori/jwt

Integration of adhocore/jwt library for laravel/lumen.

796 0
francescomalatesta/laravel-api-boilerplate-jwt

An API Boilerplate to create a ready-to-use REST API in seconds.

7,457 1,174
auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authenti...

5,378,788 274
johnturingan/laravel-jwt-auth

JSON Web Token Authentication for Laravel 4 and 5. Modification from Tymon's jwt...

4,455 0