Hi, I am trying to generate response redirect using "Saml2RedirectAuthenticationRequest" class. But, when making the redirect getting the below error.
"java.lang.IllegalArgumentException: samlRequest cannot be null or empty"
I understand need to create a samlRequest object but unable to find any document of how to. Below is the sample code am using to generate the request redirection
Saml2RedirectAuthenticationRequest authnRequest = Saml2RedirectAuthenticationRequest
.withRelyingPartyRegistration(relyingPartyRegsitration)
.relayState(relayState)
.build();
String encodedRequest = URI.create(authnRequest.getAuthenticationRequestUri().toString()).toASCIIString();
response.sendRedirect(encodedRequest);
Requesting some help here.
Comment From: abinesh-s
@jzheaux some help here please. Request you to point me to right direction and help me with some reference.
Comment From: jonnybecker
Please provide us with a minimum reproducible example.
If this isn't a bug and you just need help, take the bug-flag down. You might want to try Stack Overflow in this case.
Comment From: abinesh-s
@jonnybecker , posted the same in stackoverflow. Actually not getting any replies in stackoverflow related to Spring-Saml2-service-provider library. To reach right people posted the question here. Here is the stackoverflow link as well.
https://stackoverflow.com/questions/75790658/getting-the-error-java-lang-illegalargumentexception-samlrequest-cannot-be-nul
Comment From: jonnybecker
@abinesh-s please don't flag it as a bug then, when it only is a question. Stack Overflow is the correct address to ask these kind of questions.
Please provide us with a minimal reproducible example. With the information you provided so far, people will have trouble helping you.
Comment From: jzheaux
@abinesh-s, sorry to hear that you are having trouble ramping up. I've added an answer to the SO question you posted.
Since this is a question, I'll close it as such, and we can continue the conversation over on StackOverflow.
Comment From: jzheaux
@jonnybecker, thanks for your contribution to this ticket. In the future, please refrain from personal attacks like "no-one can/will help you" and "I would consider this as rude and lazy" as these are not in alignment with our code of conduct.
Also, we want the community to feel safe and encouraged to reach out. As such, the use of :-1: on descriptions is typically discouraged. Will you please remove it?
Comment From: jonnybecker
@jzheaux sorry for that. Removed 👎 and edited my comments.