PHP code example of uadevteampackages / imitator

1. Go to this page and download the library: Download uadevteampackages/imitator 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/ */

    

uadevteampackages / imitator example snippets


'redirect_guests_to' => env('IMITATOR_REDIRECT_GUESTS_TO', '/auth/oidc/login'),

'user' => [
    'model' => App\Models\User::class,
    'unique_by' => 'id',
    'attributes' => [
        'id' => 'id',
        'name' => 'name',
        'email' => 'email',
        'principal_name' => 'userPrincipalName',
        'username' => 'username',
        'job_title' => 'job_title',
    ],
    'create_only' => [],
],

'user' => [
    'model' => App\Models\User::class,
    'unique_by' => 'email',
    'attributes' => [
        'name' => 'name',
        'email' => 'email',
    ],
    'create_only' => [
        'password' => 'random',
    ],
],

'session' => [
    'username' => 'okta_principal', // uses config('okta-oidc.principal_resolver')
    'okta.name' => 'name',
    'okta.email' => 'email',
    'okta.session_expires_at' => 'preserve',
],

'graph_filters' => [
    'exclude_job_titles' => ['STUDENT'],
    'exclude_upn_suffixes' => ['@bama365.onmicrosoft.com'],
    'exclude_upn_prefixes' => ['oit-', 'edas-', 'admin-', 'cs-', 'iam-'],
],
bash
php artisan vendor:publish --tag=imitator-config
bash
php artisan vendor:publish --tag=imitator-views