clientSecret; } public function isComplete(): bool { return '' !== $this->clientId && '' !== $this->clientSecret; } /** * Short, one-way fingerprint used in cache keys, so a new key or secret * never reuses the old one's token or rates. Not reversible to either. */ public function fingerprint(): string { return substr( hash( 'sha256', $this->environment . '|' . $this->clientId . '|' . $this->clientSecret ), 0, 16 ); } /** Keeps the secret out of var_dump(), print_r() and logs. */ public function __debugInfo(): array { return array( 'environment' => $this->environment, 'clientId' => $this->clientId, 'clientSecret' => '' === $this->clientSecret ? '' : '[redacted]', ); } }