mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
CefRequestHandler::GetAuthCredentials |scheme| argument is optional for FTP sources (issue #1794)
This commit is contained in:
@ -188,10 +188,13 @@ typedef struct _cef_request_handler_t {
|
|||||||
///
|
///
|
||||||
// Called on the IO thread when the browser needs credentials from the user.
|
// Called on the IO thread when the browser needs credentials from the user.
|
||||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||||
// hostname and |port| contains the port number. Return true (1) to continue
|
// hostname and |port| contains the port number. |realm| is the realm of the
|
||||||
// the request and call cef_auth_callback_t::cont() either in this function or
|
// challenge and may be NULL. |scheme| is the authentication scheme used, such
|
||||||
// at a later time when the authentication information is available. Return
|
// as "basic" or "digest", and will be NULL if the source of the request is an
|
||||||
// false (0) to cancel the request immediately.
|
// FTP server. Return true (1) to continue the request and call
|
||||||
|
// cef_auth_callback_t::cont() either in this function or at a later time when
|
||||||
|
// the authentication information is available. Return false (0) to cancel the
|
||||||
|
// request immediately.
|
||||||
///
|
///
|
||||||
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
|
int (CEF_CALLBACK *get_auth_credentials)(struct _cef_request_handler_t* self,
|
||||||
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
|
struct _cef_browser_t* browser, struct _cef_frame_t* frame, int isProxy,
|
||||||
|
@ -213,12 +213,15 @@ class CefRequestHandler : public virtual CefBase {
|
|||||||
///
|
///
|
||||||
// Called on the IO thread when the browser needs credentials from the user.
|
// Called on the IO thread when the browser needs credentials from the user.
|
||||||
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
// |isProxy| indicates whether the host is a proxy server. |host| contains the
|
||||||
// hostname and |port| contains the port number. Return true to continue the
|
// hostname and |port| contains the port number. |realm| is the realm of the
|
||||||
// request and call CefAuthCallback::Continue() either in this method or
|
// challenge and may be empty. |scheme| is the authentication scheme used,
|
||||||
// at a later time when the authentication information is available. Return
|
// such as "basic" or "digest", and will be empty if the source of the request
|
||||||
// false to cancel the request immediately.
|
// is an FTP server. Return true to continue the request and call
|
||||||
|
// CefAuthCallback::Continue() either in this method or at a later time when
|
||||||
|
// the authentication information is available. Return false to cancel the
|
||||||
|
// request immediately.
|
||||||
///
|
///
|
||||||
/*--cef(optional_param=realm)--*/
|
/*--cef(optional_param=realm,optional_param=scheme)--*/
|
||||||
virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
virtual bool GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
||||||
CefRefPtr<CefFrame> frame,
|
CefRefPtr<CefFrame> frame,
|
||||||
bool isProxy,
|
bool isProxy,
|
||||||
|
@ -332,15 +332,11 @@ int CEF_CALLBACK request_handler_get_auth_credentials(
|
|||||||
DCHECK(host);
|
DCHECK(host);
|
||||||
if (!host)
|
if (!host)
|
||||||
return 0;
|
return 0;
|
||||||
// Verify param: scheme; type: string_byref_const
|
|
||||||
DCHECK(scheme);
|
|
||||||
if (!scheme)
|
|
||||||
return 0;
|
|
||||||
// Verify param: callback; type: refptr_diff
|
// Verify param: callback; type: refptr_diff
|
||||||
DCHECK(callback);
|
DCHECK(callback);
|
||||||
if (!callback)
|
if (!callback)
|
||||||
return 0;
|
return 0;
|
||||||
// Unverified params: realm
|
// Unverified params: realm, scheme
|
||||||
|
|
||||||
// Execute
|
// Execute
|
||||||
bool _retval = CefRequestHandlerCppToC::Get(self)->GetAuthCredentials(
|
bool _retval = CefRequestHandlerCppToC::Get(self)->GetAuthCredentials(
|
||||||
|
@ -324,15 +324,11 @@ bool CefRequestHandlerCToCpp::GetAuthCredentials(CefRefPtr<CefBrowser> browser,
|
|||||||
DCHECK(!host.empty());
|
DCHECK(!host.empty());
|
||||||
if (host.empty())
|
if (host.empty())
|
||||||
return false;
|
return false;
|
||||||
// Verify param: scheme; type: string_byref_const
|
|
||||||
DCHECK(!scheme.empty());
|
|
||||||
if (scheme.empty())
|
|
||||||
return false;
|
|
||||||
// Verify param: callback; type: refptr_diff
|
// Verify param: callback; type: refptr_diff
|
||||||
DCHECK(callback.get());
|
DCHECK(callback.get());
|
||||||
if (!callback.get())
|
if (!callback.get())
|
||||||
return false;
|
return false;
|
||||||
// Unverified params: realm
|
// Unverified params: realm, scheme
|
||||||
|
|
||||||
// Execute
|
// Execute
|
||||||
int _retval = _struct->get_auth_credentials(_struct,
|
int _retval = _struct->get_auth_credentials(_struct,
|
||||||
|
Reference in New Issue
Block a user