- class QOpcUaAuthenticationInformation¶
The OPC UA authentication information. More…
Synopsis¶
Methods¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
This class holds the information necessary to perform a login on a server. Supported authentication mechanisms are
Anonymous
Username
Certificate
The anonymous method is used by default but also can be set manually.
This is an example authentication using username and password.
QOpcUaAuthenticationInformation authInfo; authInfo.setUsernameAuthentication("user", "password"); m_client->setAuthenticationInformation(authInfo); m_client->connectToEndpoint(endpoint);
- __init__()¶
Default constructs an authentication information with no parameters set.
- __init__(arg__1)
- Parameters:
arg__1 –
QOpcUaAuthenticationInformation
Constructs an authentication information from
rhs
.- authenticationData()¶
- Return type:
object
The content of the QVariant returned by this method depends on the currently selected authentication method.
Returns the current authentication type.
See also
- __eq__(rhs)¶
- Parameters:
- Return type:
bool
Returns
true
if this authentication information has the same value asrhs
.- setAnonymousAuthentication()¶
Sets the authentication method to anonymous.
- setCertificateAuthentication()¶
Sets the authentication method to use certificates.
When using this authentication type a proper configured
QOpcUaPkiConfiguration
has to be set to theQOpcUaClient
.- setUsernameAuthentication(username, password)¶
- Parameters:
username – str
password – str
Sets the authentication method to username, using the given
username
andpassword
.