Download the PHP
package marcusyan/passport-custom-jwt-claims without Composer
On this page you can find all versions of the php package
marcusyan/passport-custom-jwt-claims. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
All access tokens issued by Laravel/Passport are in fact JSON web tokens (JWT).
Each token contains a set of claims consisting of JSON key value pairs. Because the token is cryptographically signed
using a public/private RSA key pair we can trust that the claims contained in the token were issued by Laravel/Passport.
Here is an example token containing the default Laravel/Passport claims:
If we decode the token you get the following JWT payload object:
For reference, the claim aud is the Laravel/Passport client_id that issued the token and the key sub refers to the
user id in your laravel users table. Note that my client_id and user_id columns are UUID data types.
Why would you need custom claims?
The OpenID Connect protocol requires JWT claims that are not included in Laravel/Passport
access tokens. Adding custom claims allows us to use access tokens issued by Laravel/Passport to authenticate with other services
using OpenID Connect. For example, with this package it is possible to use a Laravel/Passport access token to authenticate a laravel user on a
Couchbase Sync Gateway
server.
Installation
Install the package via composer:
Add the service provider to the config/app.php providers array.
Do not include Laravel\Passport\PassportServiceProvider in your providers array
as JwtClaimsServiceProvider extends from it.
Configuration
To set your custom claims you must publish the config file:
This is the contents of the published file. Add additional claims as needed.
All versions of passport-custom-jwt-claims with dependencies
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package marcusyan/passport-custom-jwt-claims contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.