The SAML module is designed to always use the application root url, in the cloud that is the mendixcloud url.
I would recommend adding a constant and changing a Java action.
The file: javasource\saml20\implementation\common\Constants.java contains a function on line 86:
public static final String getSP_URI() {
if ( SP_CONSUMER_URI == null ) {
SP_CONSUMER_URI = Core.getConfiguration().getApplicationRootUrl();
if ( !SP_CONSUMER_URI.endsWith("/") )
SP_CONSUMER_URI += "/";
}
return SP_CONSUMER_URI;
}
That function provides the url to all aspects in the saml module, if you would replace the second line in the function and instead of Core.get app root url use a constant, it would solve your problems.
just replace the line
SP_CONSUMER_URI = Core.getConfiguration().getApplicationRootUrl();
with
SP_CONSUMER_URI = Core.getConfiguration().getConstantValue("MyModule.TheConstantContainingMyURL");
I changed the javasource\saml20\implementation\common\Constants.java file according to Jaspers answer like this:
private static String SP_CONSUMER_URI = null;
private static String CUSTOM_URL = null;
public static final String getSP_URI() {
if ( SP_CONSUMER_URI == null ) {
CUSTOM_URL = Core.getConfiguration().getConstantValue("SAML20.CustomURL").toString();
if ( CUSTOM_URL == null || CUSTOM_URL.isEmpty()) {
SP_CONSUMER_URI = Core.getConfiguration().getApplicationRootUrl();
} else {
SP_CONSUMER_URI = CUSTOM_URL;
}
if ( !SP_CONSUMER_URI.endsWith("/") )
SP_CONSUMER_URI += "/";
}
return SP_CONSUMER_URI;
}
and as you can see added a SAML20.CustomURL constant. It is working like a charm now!
You can pass the url in the url with (something like)
http://app.mendixcloud.com/SSO/assertion?cont=app.mendixcloud.com/index.html
or change the constant:
WinSSO.IndexPage
If you know java you can read the loginhelper.java file