protected function prepareSecurityTokenRequest($username, $password, $address)
    {
        $fileName = __DIR__ . '/xml/SAML.xml';
        if (!file_exists($fileName)) {
            throw new \Exception("The file $fileName does not exist");
        }

        $template = file_get_contents($fileName);
        $template = str_replace('{username}', $username, $template);
        $template = str_replace('{password}', $password, $template);
        $template = str_replace('{address}', $address, $template);
        return $template;
    }
protected function prepareSecurityTokenRequest($username, $password, $address)
    {
        $fileName = __DIR__ . '/xml/SAML.xml';
        if (!file_exists($fileName)) {
            throw new \Exception("The file $fileName does not exist");
        }

        $template = file_get_contents($fileName);
        $template = str_replace('{username}', $username, $template);
        $template = str_replace('{password}', $password, $template);
        $template = str_replace('{address}', $address, $template);
        return $template;
    }
protected function prepareSecurityTokenRequest ( $ username , $ password , $ address ) { $ fileName = __DIR__ . '/xml/SAML.xml' ; if ( ! file_exists ( $ fileName ) ) { throw new \ Exception ( "The file $fileName does not exist" ) ; } $ template = file_get_contents ( $ fileName ) ; $ template = str_replace ( '{username}' , $ username , $ template ) ; $ template = str_replace ( '{password}' , $ password , $ template ) ; $ template = str_replace ( '{address}' , $ address , $ template ) ; return $ template ; }
Construct the request body to acquire security token from STS endpoint

@param string $username
@param string $password
@param string $address
@return string
@throws Exception
Construct the request body to acquire security token from STS endpoint