Download the PHP package harshpawar/laravel-passport without Composer
On this page you can find all versions of the php package harshpawar/laravel-passport. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download harshpawar/laravel-passport
More information about harshpawar/laravel-passport
Files in harshpawar/laravel-passport
Download harshpawar/laravel-passport
More information about harshpawar/laravel-passport
Files in harshpawar/laravel-passport
Vendor harshpawar
Package laravel-passport
Short Description Laravel passport authentication package easy installation.
License
Package laravel-passport
Short Description Laravel passport authentication package easy installation.
License
Please rate this library. Is it a good library?
Informations about the package laravel-passport
Laravel Passport Auth Package
- To authenticate laravel apis
Version : 1.0.0
Description : First all files added without test.
Version : 1.0.1
Description : README.md file added.
Introduction
api authentication package.
Instructions
First, install this package:
composer require harshpawar/laravel-passport
Next, move the files from vendor folder to root folder using below script
php artisan vendor:publish --tag=passport-config
php artisan vendor:publish --tag=controllers
php artisan migrate
php artisan passport:install
Configure Passport in AuthServiceProvider:
use Laravel\Passport\Passport;
public function boot()
{
$this->registerPolicies();
Passport::ignoreRoutes();
// Add Passport routes
Passport::tokensExpireIn(now()->addDays(15));
Passport::refreshTokensExpireIn(now()->addDays(30));
Passport::personalAccessTokensExpireIn(now()->addMonths(6));
// Register Passport routes manually
if (! $this->app->routesAreCached()) {
require base_path('routes/api.php');
}
}
Use Middleware: Ensure your routes are protected by the auth:api middleware.
Route::middleware('auth:api')->group(function () {
// Protected routes
});
Add config/auth.php guards details
'api' => [
'driver' => 'passport',
'provider' => 'users',
],
All versions of laravel-passport with dependencies
PHP Build Version
Package Version
The package harshpawar/laravel-passport contains the following files
Loading the files please wait ....