}
@Override
protected RedirectAction retrieveRedirectAction(final WebContext wc) {
ExtendedSAMLMessageContext context = this.contextProvider.buildSpAndIdpContext(wc);
final String relayState = getStateParameter(wc);
AuthnRequest authnRequest = this.authnRequestBuilder.build(context);
this.handler.sendMessage(context, authnRequest, relayState);
if (destinationBindingType.equalsIgnoreCase(SAMLConstants.SAML2_POST_BINDING_URI)) {
String content = ((SimpleResponseAdapter) context.getOutboundMessageTransport()).getOutgoingContent();
return RedirectAction.success(content);
} else {
String location = ((SimpleResponseAdapter) context.getOutboundMessageTransport()).getRedirectUrl();
return RedirectAction.redirect(location);
}
}