Global methods for Session
Global methods for session management, including user authentication, password
changes, and OAuth 2.0 flows.
TIP:
Global methods for Session are available under this
Session alias: . For more information, see Session aliases.
ChangeUser
Log on to
FactoryTalk Optix Application
as a different user.Argument | Data type | Description |
|---|---|---|
Username | String | Specifies the username for authentication. |
Password | Password | Specifies the password for authentication. |
Argument | Data type | Description |
|---|---|---|
Result | Boolean |
|
ResultCode | ChangeUserResultCode |
|
ChangePassword
Change the password of a specific
FactoryTalk Optix Application
user.Argument | Data type | Description |
|---|---|---|
Username | String | Specifies the username for authentication. |
NewPassword | Password | Defines the new password to replace the current password. |
OldPassword | Password | Specifies the current password for verification before changing to the new
password. |
Argument | Data type | Description |
|---|---|---|
Result | Boolean |
|
ResultCode | ChangePasswordResultCode |
|
Login
Log on as a specific
FactoryTalk Optix Application
user.Argument | Data type | Description |
|---|---|---|
Username | String | Specifies the username for authentication. |
Password | Password | Defines the password for authentication. |
Argument | Data type | Description |
|---|---|---|
Result | Boolean |
|
ResultCode | ChangeUserResultCode |
|
Logout
Log out the currently logged in
FactoryTalk Optix Application
user. This method does not take or return any arguments.StartOAuth2Flow
Start OAuth 2.0 authentication in a web browser object.
For more information about OAuth 2.0, see Authentication.
Argument | Data type | Description |
|---|---|---|
WebBrowserNodeId | NodeId | The NodeId of the web browser object to handle OAuth 2.0 authentication. See
Web browser. |
StartOAuth2WebFlow
Start OAuth 2.0 authentication in a web browser external to
FactoryTalk Optix Application
. This method does not take or return any arguments.For more information about OAuth 2.0, see Authentication.
Download file
Download a file from a
FactoryTalk Optix Application
running in a
supported modern web browser. For more information about web runtime, see Web presentation engine
TIP:
To include specific graphic objects or functionalities
for web presentation engine only, see Profile objects for different presentation engines.
The
Download file
method is available under this alias: .Argument | Data type | Description |
|---|---|---|
FilePath | String | Path to a file to download from the ProjectFiles folder.For example, %PROJECTDIR%\image.jpg For more information about ProjectFiles and other folders,
see Application structure. |
FileName | String | (optional) Custom name without extension for the downloaded file. If not set, the
original file name from FilePath is used. The custom name may only contain:
The custom name cannot use Windows® reserved names. |
Argument | Data type | Description |
|---|---|---|
Operation ID | Guid | Unique identifier for the download operation. |
For more information about downloading files, UI Session, and the related
DownloadFileStartedEvent, see File download.
Upload file
Upload a file to a
FactoryTalk Optix Application
running in a
supported modern web browser. For more information about web runtime, see Web presentation engine
IMPORTANT:
File upload overwrites files with duplicate names and extensions in
the target folder.
TIP:
To include specific graphic objects
or functionalities for web presentation engine only, see Profile objects for different presentation engines.
The
Upload file
method is available under this alias: .Argument | Data type | Description |
|---|---|---|
OutputPath | String | Path to the folder in the ProjectFiles directory where the uploaded file is saved.For example, %PROJECTDIR%\images Upload is allowed only to the project files folder and its subfolders, except for
the NetSolution and PKI folders.For more information about ProjectFiles and other folders, see Application structure. |
Argument | Data type | Description |
|---|---|---|
Operation ID | Guid | Unique identifier for the upload operation. |
For more information about uploading files, UI Session, and the related UploadFileCompletedEvent, see File upload.
user
Provide Feedback