Package com.dani.bff.gateway
Class UserServiceClient
java.lang.Object
com.dani.bff.gateway.UserServiceClient
HTTP client for the user service profile endpoint.
-
Constructor Summary
ConstructorsConstructorDescriptionUserServiceClient(org.springframework.web.reactive.function.client.WebClient webClient, DownstreamProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<UserProfile> fetchUserProfile(String userId) Fetches a user profile from the user service.
-
Constructor Details
-
UserServiceClient
public UserServiceClient(@Qualifier("userServiceWebClient") org.springframework.web.reactive.function.client.WebClient webClient, DownstreamProperties properties)
-
-
Method Details
-
fetchUserProfile
Fetches a user profile from the user service.- Parameters:
userId- authenticated user identifier- Returns:
- user profile mapped to the BFF contract
-