This example is based on the code in the SSOConnection.pm module in the VMware vSphere SDK for Perl.
This example uses the steps that are described in the Retrieve a SAML Token procedure.
my $sso_connection = new SSOConnection( 'sso_url' => $my_sso_url ); $sso_connection->login( 'user_name' => $my_sso_username, 'password' => $my_sso_password, 'public_key' => $my_cert, 'private_key' => $my_private_key ); $my_saml_token = $sso_connection->get_token();