QOpcUaAuthenticationInformation Class
OPC UA 인증 정보입니다. 더 보기...
헤더: | #include <QOpcUaAuthenticationInformation> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS OpcUa) target_link_libraries(mytarget PRIVATE Qt6::OpcUa) |
qmake: | QT += opcua |
이후: | QtOpcUa 5.13 |
공용 함수
QOpcUaAuthenticationInformation() | |
QOpcUaAuthenticationInformation(const QOpcUaAuthenticationInformation &rhs) | |
const QVariant & | authenticationData() const |
QOpcUaUserTokenPolicy::TokenType | authenticationType() const |
void | setAnonymousAuthentication() |
void | setCertificateAuthentication() |
void | setUsernameAuthentication(const QString &username, const QString &password) |
QOpcUaAuthenticationInformation & | operator=(const QOpcUaAuthenticationInformation &rhs) |
bool | operator==(const QOpcUaAuthenticationInformation &rhs) const |
상세 설명
이 클래스는 서버에서 로그인을 수행하는 데 필요한 정보를 보유합니다. 지원되는 인증 메커니즘은 다음과 같습니다.
- 익명
- 사용자 이름
- 인증서
익명 방식은 기본적으로 사용되지만 수동으로 설정할 수도 있습니다.
다음은 사용자 아이디와 비밀번호를 사용한 인증 예시입니다.
QOpcUaAuthenticationInformation authInfo; authInfo.setUsernameAuthentication("user", "password"); m_client->setAuthenticationInformation(authInfo); m_client->connectToEndpoint(endpoint);
setAnonymousAuthentication(), setUsernameAuthentication() 및 setCertificateAuthentication()도 참조하세요 .
멤버 기능 문서
QOpcUaAuthenticationInformation::QOpcUaAuthenticationInformation()
기본값은 매개변수 설정 없이 인증 정보를 구성합니다.
QOpcUaAuthenticationInformation::QOpcUaAuthenticationInformation(const QOpcUaAuthenticationInformation &rhs)
rhs 에서 인증 정보를 구성합니다.
const QVariant &QOpcUaAuthenticationInformation::authenticationData() const
이 메서드가 반환하는 QVariant 의 내용은 현재 선택한 인증 방법에 따라 달라집니다.
[invokable]
QOpcUaUserTokenPolicy::TokenType QOpcUaAuthenticationInformation::authenticationType() const
현재 인증 유형을 반환합니다.
참고: 이 함수는 메타객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
QOpcUaUserTokenPolicy::TokenType 를참조하세요 .
[invokable]
void QOpcUaAuthenticationInformation::setAnonymousAuthentication()
인증 방법을 익명으로 설정합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
[invokable]
void QOpcUaAuthenticationInformation::setCertificateAuthentication()
인증서를 사용하도록 인증 방법을 설정합니다.
이 인증 유형을 사용할 때는 QOpcUaPkiConfiguration 을 QOpcUaClient 으로 적절하게 설정해야 합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
QOpcUaPkiConfiguration 및 QOpcUaClient::setPkiConfiguration()도 참조하세요 .
[invokable]
void QOpcUaAuthenticationInformation::setUsernameAuthentication(const QString &username, const QString &password)
주어진 username 및 password 을 사용하여 인증 방법을 사용자 이름으로 설정합니다.
참고: 이 함수는 메타객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하세요.
QOpcUaAuthenticationInformation &QOpcUaAuthenticationInformation::operator=(const QOpcUaAuthenticationInformation &rhs)
이 인증 정보에 rhs 의 값을 설정합니다.
bool QOpcUaAuthenticationInformation::operator==(const QOpcUaAuthenticationInformation &rhs) const
이 인증 정보가 rhs 과 같은 값인 경우 true
을 반환합니다.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.