oAuth2 worker object weirdness

Joe Maus jmaus at theccgllc.com
Tue Aug 6 23:05:19 UTC 2024


Hi,

Omnis 10.22 31896

So, I created an oAuthWorker object subclassed from the oAUTH2Worker so I could add some token handling code to deal with the change in the Access token (overriding $tokensrefreshed to save the new data) and it won't work with my oHttpWorker object that is subclassed from the OW3 HTTP worker.  

If I do this:

Do $extobjects.OW3.$objects.OAUTH2Worker.$newref() Returns iorOAUTH2

Then most everything works - I can assign the object reference to the http.$oauth2 method and the https object will happily send my email.  But I can't save the new oauth details when the tokens are refreshed. If I use the subclassed object, by running this:

Do $objects.oAuthWorker.$newref() Returns iorOAUTH2

I get everything in it like is seen in the reference created from the base OW3 object, that is, the token is there along with all of the other bits of data and properties and it even allows the code to call my $completed method in the HTTP object ref derived from the subclassed OW3 HTTP object, but the assignment to http.oauth2 fails.  I just get a flag false back from the assignment:

Do iorHttp.$oauth2.$assign(iorOAUTH2) Returns lOk

Anyone have any idea why this assignment would fail or how I might get more information on why the assignment failed?  The $completed method does confirm it is not set with this error: "Request is missing required authentication credential."

Kind regards,

Joe Maus
jmaus at theccgllc.com
303-349-6696




More information about the omnisdev-en mailing list