$accesstoken | The access token to be used with HTTP, IMAP, POP3 and SMTP connections |
$accesstokenexpiry | The expiry date and time of the access token (in UTC time). #NULL means no access expiry date and time is available |
$addclientdetailstotokenrequest | If true,the client ID and client secret are added to the body of the token request; if false, they are omitted. Defaults to true |
$authorizeurl | The URL of the OAUTH2 authorization endpoint |
$callbackinst | The instance to which the worker object sends messages,for example when its processing has completed or has been cancelled.If you do not assign an instance to $callbackinst the worker object sends messages to itself |
$clientid | The client id used in conjunction with the client secret to identify the application to the OAUTH2 authorization server |
$clientsecret | The client secret used in conjunction with the client id to identify the application to the OAUTH2 authorization server |
$errorcode | Error code associated with the last action (zero means no error) |
$errortext | Error text associated with the last action (empty means no error) |
$followredirects | If true,the HTTP request will follow a server redirect in order to complete the request |
$granttype | A kOW3OAUTH2grant... constant (default kOW3OAUTH2grantAuthorizationCode) setting the grant type used by $authorize(). kOW3OAUTH2grantAuthorizationCode kOW3OAUTH2grantClientCredentials kOW3OAUTH2grantPassword |
$oauth2state | A value included in the request that is also returned in the token response |
$password | Password used in password grant types. |
$protocollog | If non-zero,the worker adds a log of protocol activity as a column named log to its wResults row.Defaults to kOW3logNone.Otherwise,a sum of kOW3log... constants |
$proxyauthpassword | The password used to authenticate the user when connecting to $proxyserver using $proxyauthtype |
$proxyauthtype | The type of HTTP authentication to use when connecting to $proxyserver.A kOW3httpAuthType... constant kOW3httpAuthTypeBasic kOW3httpAuthTypeDigest kOW3httpAuthTypeNone |
$proxyauthusername | The user name used to authenticate the user when connecting to $proxyserver using $proxyauthtype |
$proxyserver | The URI of the proxy server to use for all requests from this object e.g. http://www.myproxy.com:8080.Defaults to empty (no proxy server) |
$proxytunnel | If true,and $proxyserver is not empty,requests are tunnelled through the HTTP proxy |
$redirecturiserveraddress | If not empty (the default value),this property overrides localhost in the redirect URI server address,replacing localhost with the value of this property |
$refreshtoken | The refresh token to be used to request a new access token after the access token has expired |
$scope | A string identifying the type of access required |
$state | A kWorkerState... constant that indicates the current state of the worker object kWorkerStateCancelled kWorkerStateClear kWorkerStateComplete kWorkerStateInit kWorkerStateRunning |
$threadcount | The number of active background threads for all instances of this type of worker object |
$timeout | The timeout (in seconds) for requests.Zero means requests do not time out.For the OAUTH2Worker defaults to 60 with a minimum value of 10;otherwise,defaults to 10 with a minimum value of zero |
$tokentype | A string to use as fallback token type if OAuth2 does not return token_type in its response |
$tokenurl | The URL of the OAUTH2 token endpoint |
$username | Username used in password grant types. |
$authorize | $authorize([iAuthFlow=kOW3OAUTH2authFlowCodeWithPKCE]) Starts OAUTH2 authorization with $granttype on a background thread.Returns true if thread was successfully started.Properties cannot be assigned while $authorize() is running |
$cancel | $cancel() If required,cancels execution of worker on background thread.Will not return until the request has been cancelled |
$cancelled | $cancelled() Method called when the request has been cancelled |
$completed | $completed(wResults) Method called when the request completes.wResults is a row containing the results of executing the request |
$getsecureoptions | $getsecureoptions([&bVerifyPeer,&bVerifyHost,&cCertFile,&cPrivKeyFile,&cPrivKeyPassword]) gets the options that affect how secure connections are established (the options do not apply to SFTP) |
$load | $load(xOAUTH2[,xKey]) Loads properties ($clientid,$clientsecret,$authorizeurl,$tokenurl,$scope,$accesstoken,$refreshtoken,$accesstokenexpiry) from encrypted buffer xOAUTH2.xKey is a 256 bit AES encryption key.Returns true if successful |
$save | $save(&xOAUTH2[,xKey]) Saves properties ($clientid,$clientsecret,$authorizeurl,$tokenurl,$scope,$accesstoken,$refreshtoken,$accesstokenexpiry) to encrypted buffer xOAUTH2.xKey is a 256 bit AES encryption key.Returns true if successful |
$setauthcode | $setauthcode(cAuthCode) Only applicable to kOW3OAUTH2authFlowManualCode and kOW3OAUTH2authFlowManualCodeWithPKCE,when $authorize() thread is waiting for authorization code.Called from the application to supply the pasted authorization code |
$setsecureoptions | $setsecureoptions([bVerifyPeer=kTrue,bVerifyHost=kTrue,cCertFile='',cPrivKeyFile='',cPrivKeyPassword='']) sets the options that affect how secure connections are established (the options do not apply to SFTP) |
$tokensrefreshed | $tokensrefreshed() Method called to tell the worker that the access token and possibly the access token expiry and the refresh token have been refreshed |