myparcelcom/auth-module

There is no license information available for the latest version (v2.1.1) of this package.

Package for validating a JWT token and checking the contained scopes

v2.1.1 2024-04-18 06:48 UTC

This package is auto-updated.

Last update: 2024-04-24 12:30:48 UTC


README

Shared library with Authentication modules for validating JWT authorization headers and checking its scopes

Installation

The library uses Docker to run php and composer. To install Docker, follow the steps in the documentation.

Setup

To setup the project, run:

./mp.sh setup

Providers

Add a provider to set the Public Key

$this->app->singleton(JwtAuthenticator::class, function () {
    return (new JwtAuthenticator())->setPublicKey(config('auth.public_key'));
});

Commands

The following commands are available for development:

./mp.sh composer <args> - Run composer inside the container.

./mp.sh php <args> - Run any command on the php container.

./mp.sh test <args> - Run the PHPUnit tests.

License

All software by MyParcel.com is licensed under the MyParcel.com general terms and conditions.