Laravel AT Protocol Client (alpha & unstable)
at main 524 B view raw
1<?php 2 3namespace SocialDept\AtpClient\Auth; 4 5use InvalidArgumentException; 6use SocialDept\AtpClient\Crypto\P256; 7 8class OAuthKey extends P256 9{ 10 /** 11 * Load OAuth key from configuration 12 */ 13 public static function load(?string $private = null): static 14 { 15 $private ??= config('client.oauth.private_key'); 16 17 throw_if(empty($private), InvalidArgumentException::class, 'OAuth private key not configured. Run: php artisan atp-client:generate-key'); 18 19 return parent::load($private); 20 } 21}