#!/usr/bin/perl -T

#
# Perl CGI example
#

use 5.010;
use strict;
use warnings;

#
# Replace this with the Idp you want to redirect to for SSO
#
my $idp_id = "testidp.admin.pingidentity.com";

my $base_url = "${tokenServiceBaseUrl}";

#
# The saasid value is the GUID associated with the application. This is displayed in parentheses below the 
# application name on the My Applications page.
# You will need to replace the saasid value in "${saasId}" in the sample below with the GUID for your application. 
# For example: my $saas_id = "18a6ada7-8f37-4d77-86f4-173046796193";
#
my $saas_id = "${saasId}";
my $init_sso_url = "$base_url/sso/sp/initsso?saasid=$saas_id&idpid=$idp_id";

print "Status: 302 Moved\\n";
print "Location: ".$init_sso_url."\\n\\n";