LaunchBrowser Event

Fires before launching a browser with the authorization URL.

Syntax

ANSI (Cross Platform)
virtual int FireLaunchBrowser(OAuthLaunchBrowserEventParams *e);
typedef struct {
char *URL;
char *Command; int reserved; } OAuthLaunchBrowserEventParams; Unicode (Windows) virtual INT FireLaunchBrowser(OAuthLaunchBrowserEventParams *e);
typedef struct {
LPWSTR URL;
LPWSTR Command; INT reserved; } OAuthLaunchBrowserEventParams;
- (void)onLaunchBrowser:(NSString**)URL :(NSString**)command;
#define EID_OAUTH_LAUNCHBROWSER 7

virtual INT CLOUDKEYS_CALL FireLaunchBrowser(LPSTR &lpszURL, LPSTR &lpszCommand);

Remarks

When the ClientProfile property is set to cfApplication and GetAuthorization 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) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 C++ Edition - Version 20.0 [Build 8157]