public function build()
 {
     $crypto = $this->crypto ?: new Crypto();
     $timeProvider = $this->timeProvider ?: DefaultTimeProviderFactory::create();
     $nonceProvider = $this->nonceProvider ?: DefaultNonceProviderFactory::create();
     return new Client($crypto, $timeProvider, $nonceProvider, $this->localtimeOffset);
 }
 public function build()
 {
     $crypto = $this->crypto ?: new Crypto();
     $timeProvider = $this->timeProvider ?: DefaultTimeProviderFactory::create();
     $nonceValidator = $this->nonceValidator ?: function ($nonce, $timestamp) {
         return true;
     };
     $timestampSkewSec = $this->timestampSkewSec ?: 60;
     $localtimeOffsetSec = $this->localtimeOffsetSec ?: 0;
     return new Server($crypto, $this->credentialsProvider, $timeProvider, $nonceValidator, $timestampSkewSec, $localtimeOffsetSec);
 }