Download the PHP package mostbyte/auth without Composer
On this page you can find all versions of the php package mostbyte/auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mostbyte/auth
More information about mostbyte/auth
Files in mostbyte/auth
Package auth
Short Description Mostbyte authorization system from identity service
License MIT
Informations about the package auth
Mostbyte Auth
Authorization package for Laravel applications using Mostbyte Identity Service.
Requirements
| Dependency | Version |
|---|---|
| PHP | >= 8.4 |
| Laravel | 11.x, 12.x |
Version Compatibility
| Laravel Version | Package Version |
|---|---|
| < 10.x | 2.x |
| 11.x, 12.x | 3.x |
Installation
Install via Composer:
Or add manually to composer.json:
Then run:
Configuration
Publish the configuration file:
Environment Variables
| Variable | Description | Default |
|---|---|---|
IDENTITY_BASE_URL |
Identity service URL | https://auth.mostbyte.uz |
LOCAL_DEVELOPMENT |
Enable mock responses | false |
Warning
LOCAL_DEVELOPMENT=truemakes every request to the identity service return a fake success response, so any token is accepted as a valid superUser. It is an authorization bypass, not a convenience flag. The default isfalseso that a service which never sets the variable is secure; opt in explicitly in your local.envonly.Changed in 5.0.0 — previously the default was
true, which meant a deploy that forgot to setLOCAL_DEVELOPMENT=falseran with authorization disabled. If you are upgrading and relied on the old default for local work, addLOCAL_DEVELOPMENT=trueto your local.env.
Usage
Basic Middleware Usage
With No-Domain Parameter
Register as Alias
In bootstrap/app.php (Laravel 11+):
Then use in routes:
Accessing Authenticated User
License
MIT
All versions of auth with dependencies
illuminate/support Version ^11.0|^12.0
illuminate/contracts Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
guzzlehttp/guzzle Version ^7.8