Perl Example of Retrieving a SAML Token

This example is based on the code in the
external_psc_sso_workflow.pl
sample file.
This example uses the steps that are described in the Retrieve a SAML Token procedure.
For a complete and up-to-date version of the sample code, see the vSphere Automation SDK Perl samples at GitHub.
my $ssoConnection = new VMware::SSOConnection( 'sso_url' => $sso_url ); $ssoConnection->get_bearer_saml_token( 'user_name' => $params{'username'}, 'password' => $params{'password'} ); my $token = $ssoConnection->get_token();