Webroot SSO examples

The Webroot API provides a API call to obtain a unique https URL that allows Single Sign On based on the credentials passed to the API. This saves the user time as they do not need to enter in a password for the account, or even knowing what the password is. So long as the application or script calling the Webroot API knows the password, a unique URL will be obtained that can be fed into a browser. The Jupiter Server exposes the /service/api/console/gsm/{gsmKey}/webconsoleurl to make it easier for a developer to embed this in there applications in such a way that the client applications do not have access to the Webroot API credentials. 

Below are a couple of examples of using the Jupiter Server to get the unique URL for your Webroot console.

Powershell Webroot GSM SSO example
# Uri
$Uri = 'http://127.0.0.1:11111/WebRoot'

# Headers
$Headers = @{"SOAPAction"="urn:IConsoleGSM/SSOWebConsoleURL"}

# Body xml
$Xml = @'
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <SSOWebConsoleURL>
		<Console>CTCroydon</Console>		
    </SSOWebConsoleURL>
  </soap:Body>
</soap:Envelope>
'@

# Capture result
$result = (Invoke-WebRequest -UseBasicParsing -Body $Xml -method POST –contentType "text/xml" -Uri $Uri -Headers $Headers)

# Print result
$result.content