I have this code
service.confirm(identity, id)
.map(confirmationResponse -> InternalToExternalResponse.mapToExternal(confirmationResponse))
.map(externalResponse->uriBuilder.buildAuthorizeUri(externalResponse))
.lift(auditOperatorFactory.logRequestURI(identity, AuditCategory.BOOKKEEP));
Now i need to extend the uriBuilder.buildAuthorizeUri(externalResponse) to take confirmationResponse as a second parameter
Can I use the confirmationResponse from the first lambda expression inside the second lambda expression? the final code should be like
service.confirm(identity, id)
.map(confirmationResponse -> InternalToExternalResponse.mapToExternal(confirmationResponse))
.map(externalResponse-**>uriBuilder.buildAuthorizeUri(externalResponse,confirmationResponse ))**
.lift(auditOperatorFactory.logRequestURI(identity, AuditCategory.BOOKKEEP));