PHPackages                             amirilidan78/auth-token - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. amirilidan78/auth-token

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

amirilidan78/auth-token
=======================

simple laravel authentication package

08PHP

Since Apr 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Amirilidan78/auth-token)[ Packagist](https://packagist.org/packages/amirilidan78/auth-token)[ RSS](/packages/amirilidan78-auth-token/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

auth-token
==========

[](#auth-token)

simple laravel authentication package

Install

```
composer require amirilidan78/auth-token:dev-main

```

Publish migrations

```
php artisan vendor:publish --tag=auth-token-migration

```

Publish config file

```
php artisan vendor:publish --tag=auth-token-config

```

Docs

import AuthService from `Amirilidan78\AuthToken\Services`

### `AuthService::create_auth_token`

[](#authservicecreate_auth_token)

Use this function for creating token
Function returns token : string
Acceptable request header `Auth {$token}`

### `AuthService::get_auth_token_from_request`

[](#authserviceget_auth_token_from_request)

Function extract authentication token from user request
Function returns authentication token : string|null

### `AuthService::validate_token`

[](#authservicevalidate_token)

Function validate request auth token you should specify guard for this function, guard is string like `user`, `admin`, ...
Function returns authentication token : string|null

### `AuthService::logout`

[](#authservicelogout)

Function delete authentication token from database
Function returns authentication token : string|null

### `AuthService::remove_expired_auth_tokens`

[](#authserviceremove_expired_auth_tokens)

Function removes all expired tokens, expire token config key is `token_auth.token_expire_minutes`
Function returns authentication token : string|null

### `Middleware::authentication`

[](#middlewareauthentication)

Use middleware authentication with guard for secure routes
Example `->middleware(['authentication:user'])`

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 93.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/91f75d407e0cd27e39d0b6bd6a137aa2fff1bd68c716791c832f29d4346c4b1e?d=identicon)[Amirilidan78](/maintainers/Amirilidan78)

---

Top Contributors

[![amirilidan78](https://avatars.githubusercontent.com/u/46240745?v=4)](https://github.com/amirilidan78 "amirilidan78 (15 commits)")[![johnwolfdev](https://avatars.githubusercontent.com/u/126465861?v=4)](https://github.com/johnwolfdev "johnwolfdev (1 commits)")

### Embed Badge

![Health badge](/badges/amirilidan78-auth-token/health.svg)

```
[![Health](https://phpackages.com/badges/amirilidan78-auth-token/health.svg)](https://phpackages.com/packages/amirilidan78-auth-token)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
