You can modify the authentication details using the UpdateAuthenticationAndValidateRegistration method for an existing registration.
The tool must pass the SDxURL, plant name, and signature in the UpdateAuthenticationAndValidateRegistration method call.
This method is used to register a tool to SDx.
Arguments
Name |
Data type |
Input/output |
Description |
---|---|---|---|
sToolID |
String (maximum 24 characters) |
Input |
Design tool name. For example, Smart 3D. |
sToolDescription |
String |
Input |
Unique description of the tool instance that is being registered. |
oToolSPAdapterAssemblyInformation |
String |
Input |
For SmartPlant adapter, this contains adapter assembly information and an associated AppDomain information, if any. |
oToolParameters |
ISPToolParameters |
Input |
Collection of tool parameters that are consecutively passed to the tool adapter. Arguments, such as Tool Site, Tool Plant, as well as any other tool specific parameters, are passed using this argument. |
pbInIsForHandover |
Boolean |
Input |
Indicates whether the registration is for handover (Standard Smart 3D model) or not (Change Management Smart 3D model). |
reSDxSiteType |
eSDxSiteType |
Output |
Indicates the type of server site: PAB (on premesis). |
sSDxAuthPKCEClientID |
String |
Output |
Identifies the Client ID for the proof key code exchange (PKCE) authentication and redirects the tool to the applicable authentication server. |
sSDxAuthPKCEClientSecret |
String |
Output |
Identifies the Client Secret for the PKCE authentication, allows it to access Smart API, and redirects the tool to the applicable authentication server. |
sSDxAuthPKCERedirectURI |
String |
Output |
This is the Web Client URL. |
SSDxAuthPKCEScope |
String |
Output |
Determines the level of access needed by a user. |
oSDxAuthPKCEAdditionalParameters |
Dictionary (of string, string) |
Output |
Selects the token audience for PKCE authentication. |
sSDxAuthCCIDClientID |
String |
Output |
Identifies the Client ID for the Client Credentials authentication and redirects the tool to the register page. |
sSDxAuthCCIDClientSecret |
String |
Output |
Identifies the Client Secret for the Client Credentials authentication, allows it to access Smart API, and redirects the tool to the register page. |
sSDxAuthCCIDScope |
String |
Output |
Determines the level of access needed by a user for Client Credentials. |
oSDxAuthCCIDAdditionalParameters |
Dictionary (of string, string) |
Output |
Selects the token audience for Client Credentials |
sSPFURL |
String (maximum 128 characters) |
Input/Output |
SDx URL entered in the Register dialog box. This should be saved in the tool database. |
sSPFPlantName |
String |
Input/Output |
Plant the user wants to register with. |
sSPFPlantUID |
String |
Output |
Plant UID the user wants to register with. |
rstrSDxProjectName |
String |
Input/Output |
SDx project name for the selected Work Area Definition, if any. |
rstrSDxProjectUID |
String |
Output |
SDx project UID for the selected Work Area Definition, if any. |
robjSDxWorkPackage |
IContainer |
Output |
If the tool registered to a SDx server site (Cloud), this is an IContainer object with data for the Work Package objects associated with the Work Area selected during registration. If the tool registered to an SDx server site (on premesis), this is null. |
sSignature |
String (4 characters) |
Input/Output |
4-character unique value returned by SDx to be saved in the tool database. |
sIntegrationMode |
IntegrationModes |
Output |
Indicates if the tool will integrate with SDx. |
sAMQPBrokerHostName |
String |
Output |
Tools must subscribe to the Advanced Message Queuing Protocol (AMQP) server to get messages from SDx. The details required to subscribe to the AMQP server from the tool are: AMQP server broker host name, AMQP server broker protocol, AMQP server broker port, and AMQP server extensibility topic. This argument is used to subscribe to the AMQP broker host name. |
sAMQPBrokerProtocol |
String |
Output |
Subscribes to the AMQP server Broker Protocol. |
sAMQPBrokerPort |
String |
Output |
Subscribes to the AMQP server Broker Port. |
sAMQPBrokerExtensibilityTopic |
String |
Output |
Subscribes to the AMQP server for the specific Extensibility Topic. |
sSDxWebClientURL |
String |
Output |
Web Client URL provided in the Register dialog box. This should be saved in the tool database. |
Processing Narrative of the UpdateAuthenticationAndValidateRegistration Method
This method returns the following values:
-
Client ID and Client Secret for SDx Authentication, using PKCE
-
Redirect URI for SDx Authentication, using PKCE
-
Scope of SDx Authentication, using PKCE
-
Additional Parameters of SDx Authentication, using PKCE
-
Client ID and Client Secret for SDx Authentication, using Client Credentials
-
Scope of SDx Authentication, using Client Credentials
-
Additional Parameters of SDx Authentication, using Client Credentials
-
SDx URL
-
SDxplant and plant UID
-
Tool signature
-
Integration Mode
-
AMQP Broker Host Name, AMQP Broker Protocol, AMQP Broker Port, and AMQP Broker Extensibility Topic.
The tool must store all the returned value details.
Return Value
-
0 - Successful.
-
1 - User canceled the operation.
-
Negative number - Method fails (check the LastErrorMessage property for error message).
Comments
The tool calls this method to update authentication and validate registration with a SDx database. If the method is successful, the following arguments are set:
-
sSDxAuthPKCEClientID
-
sSDxAuthPKCEClientSecret
-
sSDxAuthPKCERedirectURI
-
SSDxAuthPKCEScope
-
oSDxAuthPKCEAdditionalParameters
-
sSDxAuthCCIDClientID
-
sSDxAuthCCIDClientSecret
-
sSDxAuthCCIDScope
-
oSDxAuthCCIDAdditionalParameters
-
sSPFURL
-
sSPFPlantName
-
sSPFPlantUID
-
sSignature
-
sIntegrationMode
-
sAMQPBrokerHostName
-
sAMQPBrokerProtocol
-
sAMQPBrokerPort
-
sAMQPBrokerExtensibilityTopic
The tool needs to store these values in its database. If the method fails, the modifications made in the authentication details will not be sent back to tool.