with the default module you can only fix this by setting your ApplicationRootUrl in your Custom Settings:
If you don't want to change that url (for whatever reason) then you can add these constants to the module CustomURL (default sting value undefined) and EnableCustomURL (boolean) and replace this function in the java code in file ..\javasource\saml20\implementation\common\Constants.java :
public static final String getSP_URI() {
if ( SP_CONSUMER_URI == null ) {
String customURL = saml20.proxies.constants.Constants.getCustomURL();
boolean enableCustomURL = saml20.proxies.constants.Constants.getEnableCustomURL();
if (enableCustomURL)
{
String appURL = (customURL != null && !customURL.toLowerCase().equals("undefined")) ? customURL : Core.getConfiguration().getApplicationRootUrl();
SP_CONSUMER_URI = appURL;
}
else
{
SP_CONSUMER_URI = Core.getConfiguration().getApplicationRootUrl();
}
if ( !SP_CONSUMER_URI.endsWith("/") )
SP_CONSUMER_URI += "/";
}
return SP_CONSUMER_URI;
}
this will set the correct URL in the return url in the SAML request message. Beware when upgrading the SAML module!