1. Go to this page and download the library: Download admin9/laravel-oidc-server 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/ */
admin9 / laravel-oidc-server example snippets
use Admin9\OidcServer\Contracts\OidcUserInterface;
use Admin9\OidcServer\Concerns\HasOidcClaims;
class User extends Authenticatable implements OidcUserInterface
{
use HasOidcClaims;
// Optional: Override for custom claims
protected function resolveOidcClaim(string $claim): mixed
{
return match ($claim) {
'nickname' => $this->display_name,
'picture' => $this->avatar_url,
default => parent::resolveOidcClaim($claim),
};
}
}