Download the PHP package mobieve/auth-client without Composer
On this page you can find all versions of the php package mobieve/auth-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mobieve/auth-client
More information about mobieve/auth-client
Files in mobieve/auth-client
Package auth-client
Short Description This package provides Classes for Auth Clients made by Mobieve.
License MIT
Informations about the package auth-client
mobieve-auth-client-php
Mobieve Auth Client PHP
This package provides Classes for Auth Clients made by Mobieve.
- Mobieve\AuthClient\Facades\CustomClient
- Mobieve\AuthClient\Middleware\MobieveAuthMiddleware
- Mobieve\AuthClient\Models\CustomClient
- Mobieve\AuthClient\Providers\CustomClientServiceProvider
Mobieve Custom HTTP Client
Configuration
In config/app.php include:
and:
If user requests is needed you also need to include:
You also need to configure auth service info in config/services.php, like:
and include your personal MOBIEVE_AUTH_CLIENT_ID and MOBIEVE_AUTH_CLIENT_SECRET in your environment variables.
Usage
Middleware
Four different middleware classes are available.
MobieveClientAuthMiddleware is used to ensure that the requester is a Client registered in Mobieve Auth server.
MobieveUserAuthMiddleware, on the other hand, is used to ensure that the requester is an User registered in Mobieve Auth server.
MobieveUserTeamAuthMiddleware, is used to ensure thar the request is an User with Team registered in Mobieve Auth server.
MobieveAuthMiddleware, will only check if token is valid.
To use Mobieve Middleware layer in order to check incoming requests authorization include following line in Http/Kernel.php:
You need to include the middleware that you want to use in Http/Kernel.php file, as demonstrated below:
and add 'mobieve.auth-client' or 'mobieve.auth-user' in all routes you need to protect, according to the desired behavior.
All versions of auth-client with dependencies
guzzlehttp/guzzle Version ^6.5.0
illuminate/support Version ^6.0
symfony/http-kernel Version ^4.4.1
symfony/psr-http-message-bridge Version ^2.0
tymon/jwt-auth Version ^1.0.0-rc-5