payloadtoken/aragorn52

this library for payload from access token in lumen passport
52
Install
composer require payloadtoken/aragorn52
Latest Version:1.0.4
PHP:^8.1
License:proprietary
Last Updated:Sep 20, 2022
Links: GitHub  ·  Packagist
Maintainer: Aragorn52

Payload-token

Library to add payload to Access token for lumen passport

Dependencies

  • PHP >= 8.1
  • Lumen >= 9.0
  • Lumen-passport: >= 0.1.1

Installation via Composer

$ composer require payloadtoken/aragorn52

Or if you prefer, edit composer.json manually:

{
    "require": {
        "payloadtoken/aragorn52": "^1.0"
    }
}

Modify the bootstrap flow (bootstrap/app.php file)

$app->register(\Payload\Providers\PassportServiceProvider::class);

Create YourCustomClaimService. Extends \Payload\Services\AbstractClaimService

in method addCustomClaim add for claimCollection your claims

id user can be obtained by accessing the $this->id property YourCustomClaimService

class YourCustomClaimService extends \Payload\Services\AbstractClaimService
{
    public function addCustomClaims(): void
    {
        $this->claimCollection->add('test', 'testClaim');
        $this->claimCollection->add('test2', 'testClaim2');
    }
}

Modify the AppServiceProvider flow (app/Providers/PassportServiceProvider) add this code in method boot()

    public function boot()
    {
        $this->app->bind(\Payload\Services\AbstractClaimService::class, fn () => new YourCustomClaimService());
    }

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440