Package com.irurueta.authserver.bff.infrastructure.resourceserver
package com.irurueta.authserver.bff.infrastructure.resourceserver
Resource-server adapter of the BFF: implements the
DocumentGateway port with the REST client generated from the
resource server's contract (apis/resource-server/rest-server/resource-server-api-v1.yaml). Every call carries
the access token of the signed-in user, which never reaches the browser, and every failure is translated into a
domain exception, so no HTTP or OAuth2 type crosses the port.-
ClassDescriptionMaps the model of the generated resource-server client onto the domain, so the generated types never leave this adapter.Builds the client of the resource server: the
RestClientthat carries the access token of the signed-in user, and theDocumentsApigenerated from the resource server's contract on top of it.Where the resource server is (bff.resource-server.*).Implements the documents port with the client generated from the resource server's contract.Maps theWWW-Authenticatechallenge of a401answer of the resource server onto the domain: a bearer challenge witherror="insufficient_user_authentication"(RFC 9470) becomes aDocumentsStepUpRequiredExceptioncarrying itsacr_valuesandmax_age.