Worked great Sean.. thank you!
Thanks for your reply.. after hours of researching what Robert posted, I could not get it to work either. I thought I had it solved by instantiating a new object content=##Class(%Library.Stream.Object).%New()... and building that.. then setting into %Request.Content=Content but it doesn't like that either.. so I am at a loss as well.
seems that simply referring to $username essentially works... thanks for all the input
Eduard.. I think this is closer to what we need. The challenge we have is this is a enterprise level legacy M system with it's own global for user security. So, I have noticed that it is setting up a delegated user of OAuth... and when I put something in the properties(comment) array it updates the comment for that delegated user.
I don't want to update the cache user with what is coming in... and it looks like OAuth will do that.... We have a web app through another technology where the user authenticates and gets their token from another systems server. Our server houses some REST services that the web app needs. So we simply need to validate the token (I have this working) and switch the users context to the access they should have within Cache (per our legacy systems security global).
The second part is the part that doesn't seem to "take" because when I get to the REST service dispatch class, I can't seem to reference the user account. Maybe there is an object or sys variable I can use that I am unaware of.. or maybe I need to update something in ZAUTHENTICATE to pass it along... this is where I am stuck.Thanks,
Thanks for the reply... ZAUTHENTICATE is invoked on it's own, and to my knowledge I don't have any control over the call. I have a web application setup with Delegated security. When the web server gets a request to a URL within that web app... ZAUTHENTICATE is simply invoked by the system. I am sure there is an actual call somewhere in the %SYS routines.. but I haven't looked for that yet, and probably shouldn't change anything if I find it.
I did set a value to the "Comment" node of the array.. but then in the REST Service dispatch class (the next class invoked) that array is not resident... or at least the value is no longer in comment. (since it is all web based I can't debug real time, I am capturing variable values to a scratch global)
I guess I can try setting the username etc. because the user name I get from the Token should be the same as the Cache username... and if that makes it to the dispatch class, I can lookup the software user name there
Portuguese or not.. that worked for me too :)
Thank you a bunch, I had the https://www. in the servername which was probbly a big part of my problem.
Now on to parsing the stream into usable data!
Thanks Rubens... I have tried that and even in just testing the config I get the error
ERROR #989: SSL connection failed, make sure server address and port (not url) is specified
I changed the Protocols from TLS to SSL and get the same... I have tried to port 80 and port 443.
I have an email into the site too to see if they can assist.
For server address I am just putting https://www.fantasyfootballnerd.com
that is the actual address... didn't want to put it out there and kill them with traffic, it is a small service... but this may help solve I would think if you have the actual address.
I think this all hasn't been working because I get back a 301 message saying to use the https:// location (and if you look above having trouble connecting there)
But related to the return.. my current GET() method is empty, does it need formatted to receive what I am expecting back?
ok.. I built a configuration, but how do I determine what the server requires.. is there anything in my 301 message that helps me determine that?
wow.. great that worked.. Thanks Ed... but now the next newbie question.
If I understand from looking at the dump of the object, my results are in my aa.HttpResponse.Data as a stream.
How do I now work with the stream?
Log in or create a new account to continue