AuthenticationDialogRequest QML Type
프록시 또는 HTTP 서버에 필요한 인증 자격 증명을 제공하기 위한 요청입니다. 더 보기...
Import Statement: | import QtWebEngine |
Since: | QtWebEngine 1.4 |
속성
방법
- void dialogAccept(string username, string password)
- void dialogReject()
상세 설명
인증 다이얼로그 요청은 WebEngineView::authenticationDialogRequested 신호의 인수로 전달됩니다. 기본 HTTP 또는 프록시 인증이 필요할 때 생성됩니다. 인증 유형은 type 프로퍼티로 확인할 수 있습니다.
요청의 accepted 속성은 요청이 사용자 코드에 의해 처리될지 아니면 기본 대화 상자가 표시될지를 나타냅니다. accepted 속성을 true
으로 설정한 경우 dialogAccept() 또는 dialogReject()을 호출해야 합니다.
다음 코드는 사용자 정의 대화 상자를 사용하여 요청을 처리합니다:
WebEngineView { // ... onAuthenticationDialogRequested: function(request) { request.accepted = true; myDialog.request = request // keep the reference to the request myDialog.accept.connect(request.dialogAccept); myDialog.reject.connect(request.dialogReject); myDialog.visible = true; } // ... }
속성 문서
accepted : bool |
시그널 처리기가 인증 대화 상자 요청을 수락했는지 여부를 나타냅니다.
WebEngineView::authenticationDialogRequested 에 대한 시그널 핸들러가 실행된 후 속성이 false
인 경우 기본 인증 대화 상자가 표시됩니다. 이를 방지하려면 request.accepted
을 true
으로 설정하세요.
기본값은 false
입니다.
type : enumeration |
인증 요청의 유형입니다.
상수 | 설명 |
---|---|
WebEngineAuthenticationDialogRequest.AuthenticationTypeHTTP | HTTP 인증. |
WebEngineAuthenticationDialogRequest.AuthenticationTypeProxy | 프록시 인증입니다. |
url : url |
인증이 요청된 HTTP 요청의 URL입니다. 프록시 인증의 경우 호스트를 통해 프록시된 요청 URL입니다.
proxyHost 를참조하세요 .
메서드 문서
이 함수는 인증에 필요한 username 및 password 을 제공하여 사용자가 대화 상자를 수락했음을 엔진에 알립니다.
void dialogReject() |
이 함수는 사용자가 대화 상자를 거부했음을 엔진에 알리고 인증이 진행되지 않음을 알립니다.
© 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.