PHP code example of redmix0901 / oauth2-client-sso

1. Go to this page and download the library: Download redmix0901/oauth2-client-sso library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

redmix0901 / oauth2-client-sso example snippets

 php
Route::middleware('oauth2-sso') 
 php
Route::middleware('oauth2-sso:redirect') 
 php
Route::middleware('oauth2-sso:cookie') 
 php
Route::middleware('oauth2-sso:cookie,redirect') 
 php
Route::middleware('oauth2-sso:cookie') 
 php
'Authorization' => 'Bearer ' . $token
 php
[
    'error'   => true,
    'data'    => null,
    'message' => 'Unauthenticated.',
]
 php
$request->user()
 php
Redmix0901\Oauth2Sso\Events\UserSsoCreated::class