void Init(Uri publicOrigin, string modulePath)
{
if (!modulePath.StartsWith("/", StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentException("modulePath should start with /.");
}
if(!publicOrigin.AbsoluteUri.EndsWith("/", StringComparison.Ordinal))
{
publicOrigin = new Uri(publicOrigin.AbsoluteUri + "/");
}
var authServicesRoot = publicOrigin.AbsoluteUri.TrimEnd('/') + modulePath + "/";
AssertionConsumerServiceUrl = new Uri(authServicesRoot + CommandFactory.AcsCommandName);
SignInUrl = new Uri(authServicesRoot + CommandFactory.SignInCommandName);
ApplicationUrl = publicOrigin;
LogoutUrl = new Uri(authServicesRoot + CommandFactory.LogoutCommandName);
}