Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

wicket6 + sso and redirects

$
0
0
Hi,

I'm adding support to my application use SSO outbound from my webapp to
an Identity provider (IP) to authenticate a user from my webapp to an
external web application.

I have SSO code and the steps involved on my page are:

1. send redirect to

https://www.3rdparty.com?authnReqRedirectUrl=myurl

where myurl is a wicket page e.g. /sso

2. Now the wicket page at /sso should receive a SAMLRequest parameter,
which is then used to create a SAMLResponse

3. The SAMLResponse should be posted back to the 3rd party thru a form:

<form wicket:id="form" method="post" action="third party url">
<input wicket:id="samlresponse" type="hidden"/>
<input type="submit" value="Submit"/>
</form>

I believe the form can be auto-submitted thru javascript:

<script type="text/javascript">
window.onload = function () {
document.forms[0].submit();

</script>

And then the user should land on the 3rdparty web application.

So basically my question is how do I do step 1, I'm using wicket6 and tried:

add(new AjaxLink<Void>("test") {
@Override
public void onClick(AjaxRequestTarget target) {
throw new
RedirectToUrlException("https://thirdparty.com?authnReqRedirectUrl=https://mysite.com/sso");

});

But seems that it doesn't return to my wicket page mounted at /sso. Am I
doing this right?

Thanks, Jason

Viewing all articles
Browse latest Browse all 5648

Trending Articles