kauth

kauth

kauth

kauth is JWT API Authentication ( jwt-auth ) for laravel

Installation

you can install kauth package by command

composer require code4mk/kauth

Setup

1) Vendor publish.

php artisan vendor:publish --provider="Kauth\KauthServiceProvider" --tag=config
php artisan vendor:publish --provider="Kauth\KauthServiceProvider" --tag=migations

2) Config setup

Usage

Kauth::attempt() functions

~ attempt() return a jwt token which you pass with request header (ex:axios header)

attempt special

attempt(["usernames"=>["id","email","name"],"username"=>"request query for username","password=>123456"]);

Kauth::check()

Kauth::check();

Kauth::id()

Kauth::id();

Kauth::refreshToken()

Kauth::refreshToken()

Kauth::logout()

Kauth::logout();

Kauth::logoutOtherDevices()

Kauth::logoutOtherDevices();

<p align="center" ></p>