Download the PHP package jhonhuanuco-dev/security-pe without Composer
On this page you can find all versions of the php package jhonhuanuco-dev/security-pe. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jhonhuanuco-dev/security-pe
More information about jhonhuanuco-dev/security-pe
Files in jhonhuanuco-dev/security-pe
Package security-pe
Short Description Security-pe proporciona un sistema de autenticación y seguridad para APIs simples.
License MIT
Homepage https://github.com/jhonHuanuco-dev/security-pe
Informations about the package security-pe
Installation
-
To install the package use the following command:
-
Register the service provider in the
config/app.php
file: -
Publish the configuration file
config/securitype.php
with the following command: - Remove the following migrations to avoid conflicts, as Security.pe migrations will be used by default:
users
personal_access_tokens
-
Modify your
app/Models/User.php
model. -
Add a default connection string for your database in
config/database.php
called default.: -
Register the middleware of
ActivityUserRequest
in theApp\Http\Kernel.php
.: -
Update your configuration file
config/securitype.php
according to your needs before running the migrations.. - Execute the following command to run the migrations:
Usage
Log-in
Authenticate your application users and register the encrypted token in the database.
Parameter | Type | Description |
---|---|---|
username |
string |
Required. User name registered in the database. |
password |
string |
Required. Password of the user registered in the database. |
Log-out
Removes the session token of the authenticated user.
Parameter | Type | Description |
---|---|---|
Bearer |
string |
Automatic. Bearer token |
Validate Token.
Validate if the token is valid and/or has not expired. The user must be authenticated and the bearer token must be included in the request header.
Parameter | Type | Description |
---|---|---|
Bearer |
string |
Automatic. Bearer token |
Authors
License
Security.pe is open-sourced software licensed under the MIT license.
All versions of security-pe with dependencies
illuminate/contracts Version ^10.0
illuminate/database Version ^10.0
illuminate/http Version ^10.0
illuminate/support Version ^10.0
laravel/framework Version >=10.48
laravel/sanctum Version ^3.2
symfony/http-foundation Version ^6.0.0