Cloud Mail 2020 Python Edition

Questions / Feedback?

on_launch_browser Event

Fires before launching a browser with the authorization URL.

Syntax

class OAuthLaunchBrowserEventParams(object):
  @property
  def url() -> str: ...
  @url.setter
  def url(value) -> None: ...
  @property
  def command() -> str: ...
  @command.setter
  def command(value) -> None: ...

# In class OAuth:
@property
def on_launch_browser() -> Callable[[OAuthLaunchBrowserEventParams], None]: ...
@on_launch_browser.setter
def on_launch_browser(event_hook: Callable[[OAuthLaunchBrowserEventParams], None]) -> None: ...

Remarks

When the client_profile property is set to cfApplication and get_authorization is called the class will fire this event with the Command which will be executed by the class. The URL parameter will be the authorization URL which the user will be directed to authenticate.

Within this event you may override the current value of either Command or URL and provide your own value. If Command is set to empty string the class will not attempt to launch the browser and instead you will be responsible for directing the user to the authorization URL specified by AuthorizationURL.

In Windows, ShellExecute is used to execute Command, which limits the verbs available for use in Command to:

  • edit
  • explore
  • find
  • open
  • print

 
 
Copyright (c) 2021 /n software inc. - All rights reserved.
Cloud Mail 2020 Python Edition - Version 20.0 [Build 7718]