clientId !== '' && $this->clientSecret !== ''; } public function getClientId(): string { return $this->clientId; } public function getClientSecret(): string { return $this->clientSecret; } public function __toString(): string { return 'Basic ' . base64_encode($this->clientId . ':' . $this->clientSecret); } public static function load(IConfig $config): self { return new static( $config->getValue('clientId', CfgType::T_STR), $config->getValue('clientSecret', CfgType::T_STR) ); } }