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.
  • Class
    Description
    Maps 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 RestClient that carries the access token of the signed-in user, and the DocumentsApi generated 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 the WWW-Authenticate challenge of a 401 answer of the resource server onto the domain: a bearer challenge with error="insufficient_user_authentication" (RFC 9470) becomes a DocumentsStepUpRequiredException carrying its acr_values and max_age.