Download the PHP package zedsh/laravel-b24-auth-guzzle without Composer
On this page you can find all versions of the php package zedsh/laravel-b24-auth-guzzle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download zedsh/laravel-b24-auth-guzzle
More information about zedsh/laravel-b24-auth-guzzle
Files in zedsh/laravel-b24-auth-guzzle
Download zedsh/laravel-b24-auth-guzzle
More information about zedsh/laravel-b24-auth-guzzle
Files in zedsh/laravel-b24-auth-guzzle
Vendor zedsh
Package laravel-b24-auth-guzzle
Short Description Bitrix24 laravel Oauth middleware on Guzzle
License MIT
Package laravel-b24-auth-guzzle
Short Description Bitrix24 laravel Oauth middleware on Guzzle
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-b24-auth-guzzle
laravel-bitrix24-guzzle
This is middleware for lavarel that ensures the user has bitrix24 authorization token.
Features
Two step auth
Check expires
Refresh User Data on 2 step of auth
Check auth
Installation
Step 1.
In .env:
B24_HOSTNAME=https://[yourhostname].bitrix24.ru
B24_CLIENT_ID=
B24_CLIENT_SECRET=
Step 2. In app/Http/Kernel.php:
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
//ADD THIS ->
'b24auth'=>\zedsh\laravel\B24\Auth::class,
];
Step 3. In routes/web.php:
//Add middleware with param 'two' in root of site - two step of auth work over this.
Route::get('/', 'HomeController@index')->name('root page')->middleware('b24auth:two');
//Add middleware with param 'init' in both route of site, and step 1 auth work on this route. After auth work redirect to root and work step two.
Route::get('/b24_state', 'HomeController@getB24State')->name('b24_state')->middleware('b24auth:init');
For refresh user
In app/User.php:
//Add Method in User class:
public function B24Refresh()
{
Auth::user()->update(['b_user_id'=>$this->B24Creds()->user_id]);
}
All versions of laravel-b24-auth-guzzle with dependencies
PHP Build Version
Package Version
Requires
guzzlehttp/guzzle Version
^6.3
The package zedsh/laravel-b24-auth-guzzle contains the following files
Loading the files please wait ....