class SessionService {

    public AuthnResponseFromHubContainerDto getRpAuthnResponse(SessionId sessionId) {
        getSessionIfItExists(sessionId);
        if (authnRequestHandler.isResponseFromCountryWithUnsignedAssertions(sessionId)) {
            AuthnResponseFromCountryContainerDto authResponseFromCountryContainerDto = authnRequestHandler.getAuthnResponseFromCountryContainerDto(sessionId);
            return samlEngineProxy.generateRpAuthnResponseWrappingCountrySaml(authResponseFromCountryContainerDto);
        }

        ResponseFromHub responseFromHub = authnRequestHandler.getResponseFromHub(sessionId);
        return samlEngineProxy.generateRpAuthnResponse(responseFromHub);
    }

    @Inject public  SessionService(SamlEngineProxy samlEngineProxy,
                          TransactionsConfigProxy configProxy,
                          AuthnRequestFromTransactionHandler authnRequestHandler,
                          SessionRepository sessionRepository);

}