I have a condition in my application where we store certain values specific to the application in the cookies before sending the SAML request to the IDP and need to get back the cookies in the idp response. I am not finding a provision to add any cookies before generating the saml request.
The interface Saml2AuthenticationRequestResolver has T resolve(HttpServletRequest request);, the resolve method only has request parameter not response. So not able to add cookies.

custom authenticationrequestresolver 
   @Component
    public class AuthenticationRequestResolver implements Saml2AuthenticationRequestResolver {

public OpenSaml4AuthenticationRequestResolver authenticationRequests;

@Autowired
public AuthenticationRequestResolver(RelyingPartyRegistrationRepository repository) {
    authenticationRequests = new OpenSaml4AuthenticationRequestResolver(repository);
}

@Override
public <T extends AbstractSaml2AuthenticationRequest> T resolve(HttpServletRequest request) {
    --able to get the cookies which i added in my controller here 
            Cookie[] cookies = request.getCookies();
            T post = authenticationRequests.resolve(request);
           -- not sure how to add the cookies to the post 
    }

Comment From: sasirekha98

Closing the issue as i figured out its due to configuration issue at my end.