accessToken = $accessToken; $this->clientToken = $clientToken; $this->rawAvailableProfiles = $availableProfiles; $this->rawSelectedProfile = $selectedProfile; $this->rawUser = $user; } public function getAccessToken(): string { return $this->accessToken; } public function getClientToken(): string { return $this->clientToken; } /** * @return ProfileInfo[] */ public function getAvailableProfiles(): array { return array_map([ProfileInfo::class, 'createFromResponse'], $this->rawAvailableProfiles); } public function getSelectedProfile(): ProfileInfo { return ProfileInfo::createFromResponse($this->rawSelectedProfile); } public function getUser(): AuthenticationResponseUserField { return new AuthenticationResponseUserField($this->rawUser['id'], $this->rawUser['properties']); } }