QOpcUaAuthenticationInformation#

The OPC UA authentication information. More

Synopsis#

Functions#

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);
class PySide6.QtOpcUa.QOpcUaAuthenticationInformation#

PySide6.QtOpcUa.QOpcUaAuthenticationInformation(arg__1)

Parameters:

arg__1PySide6.QtOpcUa.QOpcUaAuthenticationInformation

Default constructs an authentication information with no parameters set.

Constructs an authentication information from rhs.

PySide6.QtOpcUa.QOpcUaAuthenticationInformation.authenticationData()#
Return type:

object

The content of the QVariant returned by this method depends on the currently selected authentication method.

PySide6.QtOpcUa.QOpcUaAuthenticationInformation.authenticationType()#
Return type:

TokenType

Returns the current authentication type.

See also

TokenType

PySide6.QtOpcUa.QOpcUaAuthenticationInformation.__eq__(rhs)#
Parameters:

rhsPySide6.QtOpcUa.QOpcUaAuthenticationInformation

Return type:

bool

Returns true if this authentication information has the same value as rhs.

PySide6.QtOpcUa.QOpcUaAuthenticationInformation.setAnonymousAuthentication()#

Sets the authentication method to anonymous.

PySide6.QtOpcUa.QOpcUaAuthenticationInformation.setCertificateAuthentication()#

Sets the authentication method to use certificates.

When using this authentication type a proper configured QOpcUaPkiConfiguration has to be set to the QOpcUaClient .

PySide6.QtOpcUa.QOpcUaAuthenticationInformation.setUsernameAuthentication(username, password)#
Parameters:
  • username – str

  • password – str

Sets the authentication method to username, using the given username and password.