« Back to Product

Documentation

ProcessOAuthData

Require: Symcon >= 4.1

 void ProcessOAuthData ()

Returns

No return

Description

If the OAuth handler registered by the function RegisterOAuth is called, this function is executed. The received OAuth credentials can be read, for example, via the corresponding PHP input streams.

Example

// IPSModuleStrict
protected function ProcessOAuthData(): void {
    // OAuth credentials from the request
    $token = file_get_contents('php://input');
    $this->LogMessage('OAuth token received', KL_MESSAGE);

    // Save token
    $this->WriteAttributeString('OAuthToken', $token);
}

// IPSModule
protected function ProcessOAuthData($Token) {

    // Example is identical. Please note the changed function signature.

}
Any questions?