azure = $azure; $this->chillRedis = $chillRedis; } public function getToken(): AccessTokenInterface { if (null === $this->accessToken || $this->accessToken->hasExpired()) { $this->accessToken = $this->azure->getAccessToken('client_credentials', [ 'scope' => 'https://graph.microsoft.com/.default', ]); } return $this->accessToken; } public function storeToken(AccessToken $token): void { $this->chillRedis->set(self::KEY, serialize($token)); } }