1234567891011121314151617181920212223242526272829 |
- <?php
- namespace DNB;
- final class ClientConfig {
- public function __construct(
- private string $id,
- private string $secret,
- private bool $is_test = true,
- ) {
- }
- public function get(): object {
- return new class (
- $this->id,
- $this->secret,
- $this->is_test ? 'uat-process-externalpart' : 'dnb-process-externalpart',
- $this->is_test ? 'uat-nextgen-identityserver' : 'dnb-nextgen-identityserver',
- ) {
- public function __construct(
- public string $id,
- public string $secret,
- public string $endpoint,
- public string $auth_endpoint,
- ) { }
- };
- }
- }
|