Download the PHP package smskin/myhouse-identity-service-client without Composer
On this page you can find all versions of the php package smskin/myhouse-identity-service-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download smskin/myhouse-identity-service-client
More information about smskin/myhouse-identity-service-client
Files in smskin/myhouse-identity-service-client
Package myhouse-identity-service-client
Short Description Guards for auth by identity service
License MIT
Homepage https://github.com/smskin/myhouse-identity-service-client
Informations about the package myhouse-identity-service-client
About Identity service library
This library based on https://github.com/smskin/laravel-identity-service-client library.
Identity service is a service that allows you to organize authorization in a laravel application through a common remote server. This allows you to organize a multi-service architecture with end-to-end authorization.
Identity service library consists of 2 parts:
- identity service - Master auth service (https://github.com/smskin/laravel-idenity-service)
- identity service client - this package. A client that allows application users to log in through a shared service
Installation
- Run
composer require smskin/myhouse-identity-service-client
- Run
php artisan vendor:publish --tag=identity-service-client
- Configure identity service client with
identity-service-client.php
in config folder and environments - Change create user table migration file
- Run
php artisan migrate
Migrations
User will be creating automatically if user open site with correct jwt. You must change users table for support nullable fields.
I usually remove all columns except id and dates because they are not needed (authorization happens through a remote server). For example:
Environments
- IDENTITY_SERVICE_CLIENT_HOST - public address of identity service (https://github.com/smskin/laravel-idenity-service)
- IDENTITY_SERVICE_CLIENT_DEBUG - debug mode of auth gates
Configuration
You can configure library with identity-service-client.php
file.
- classes
- models
- user - Class of User model. You can override it with your user model class. You must implement
HasIdentity
contract and implementIdentityTrait
trait
Example of Users model:
Using
This library register 2 guards:
- identity-service-client-jwt
- identity-service-client-session
You can use it with auth middleware (for example: auth:identity-service-client-jwt
) or bind it's to already exists guards by auth.php
config file.
For example:
All versions of myhouse-identity-service-client with dependencies
ext-sync Version *
laravel/framework Version ^8 || ^9 || ^10
guzzlehttp/guzzle Version ^7.0
smskin/laravel-support Version ^2.0