PHP code example of srlopes / laravel-keycloak-admin
1. Go to this page and download the library: Download srlopes/laravel-keycloak-admin 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/ */
srlopes / laravel-keycloak-admin example snippets
use KeycloakAdm\Facades\KeycloakAdmin;
KeycloakAdm::user()->create([
'body' => [ // https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_userrepresentation
'username' => 'foo'
]
]);
KeycloakAdmin::user()->all([
'query' => [
'email' => '[email protected]'
]
])
KeycloakAdm::user()->update([
'id' => 'user_id',
'body' => [ // https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_userrepresentation
'username' => 'foo'
]
]);
KeycloakAdm::role()->get([
'id' => 'role_id'
]);
php artisan vendor:publish --provider="KeycloakAdm\KeycloakAdminServiceProvider"