GetOAuthSettings

Syntax

GetOAuthSettingsResult GetOAuthSettings(GetOAuthSettingsArg tArg)

Parameters

tArg. Operation execution parameters.

Description

The GetOAuthSettings operation gets the list of external authentication services and their settings.

Comments

The list of external services with the settings that are sent to the operation is set on BI server in the OAuth subsection of the registry/settings.xml file.

To execute the operation, in the tArg.svcKey field specify element key with external service settings. When the value is -1, settings of all services determined on BI server are obtained.

The operation results in the list of services and their settings. Each element of the list will have identifier, key, and icon that are determined in the id, key, and icon fields.

Example

Below is the example of getting the list of external services and their settings.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetOAuthSettings xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
  <svcKey>-1</svcKey>
  </tArg>
  </GetOAuthSettings>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<GetOAuthSettingsResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<settings xmlns="">
<it>
  <id>Google</id>
  <authUrl />
  <key>0</key>
  <icon>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB5SURBVDhPlZHJEQAhCASNy4CMx2hMxmBwPaBgxLXsJ9IyaKBHUKg5BiDmug47SnB6GeWwoLrtjVSSJ/TqIJVZODIF7r+2L4HzQBiXIWwDJOFCTTaCTEABl5Ynwh22m3hpMWCLo2D+QY35ET4wuMIXBo5lY6Jw5VEgatYLFxcSCQWXAAAAAElFTkSuQmCC</icon>
  </it>
  </settings>
  </GetOAuthSettingsResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"GetOAuthSettings" :
{
"tArg" :
{
"svcKey" : "-1"
}
}
}

JSON response:

{
"GetOAuthSettingsResult" :
{
"settings" :
{
"it" :
{
"id" : "Google",
"authUrl" : "",
"key" : "0",
"icon" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB5SURBVDhPlZHJEQAhCASNy4CMx2hMxmBwPaBgxLXsJ9IyaKBHUKg5BiDmug47SnB6GeWwoLrtjVSSJ/TqIJVZODIF7r+2L4HzQBiXIWwDJOFCTTaCTEABl5Ynwh22m3hpMWCLo2D+QY35ET4wuMIXBo5lY6Jw5VEgatYLFxcSCQWXAAAAAElFTkSuQmCC"
}
}
}
}
public static GetOAuthSettingsResult GetOAuthSettings()
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new GetOAuthSettings()
{
tArg = new GetOAuthSettingsArg()
{
svcKey = uint.MaxValue
}
};
// Get list of external authentication services and their settings
var result = somClient.GetOAuthSettings(tGet);
return result;
}

See also:

Working with Repository