How to obtain external info using GAM External Authentication in Genexus SD

0

GX16

Generator c #

I'm putting together a WEB / SD system that uses GAM External Authentication: version 2.0 in GX16. The scenario is that I have n external systems each with their users and keys. I have to build a new one keeping users and keys of each of the systems already in use.

I made the external login work through webservices and WEB environment without problems, with the example that the GAM brings in GAMExampleLogin and I was able to obtain &GAMExampleSDTApplicationData with data from the external system in the new system.

Now I want to do the same thing in the SD environment, I saw that it is different what the factory GAM brings in the GAMSDLogin but I could log in with the external system.

What I could not get the data from the external system, I do this:

GeneXus.SD.Actions.LoginExternal(GAMAuthenticationTypes.ExternalWebService, &User, &Password, &LoginExternalAdditionalParameters)
&GAMSession=GamSession.Get(&GAMError) //ACA SE CAE LA APP SD
&ApplicationData = &GamSession.GetApplicationData() //ACA NO LLEGA NUNCA 

Then I can not get the data associated with the external user.

Any help that may be happening? Maybe I'm not doing the correct way in SD to get the data associated with the user logged in SD? Why CRASH the SD app once you login when you request the GamSession object? Could it be that the way to ask for it is wrong?

Thank you very much

Bruno

    
asked by bcamargo75 12.10.2018 в 20:54
source

1 answer

0

I answer myself and tell them how I solved in case someone serves:

create an "ExtraDatosSesion" proc and I did webservice and return &GAMExampleSDTApplicationData :

 &ApplicationData = GAMSession.GetApplicationData()
 &GAMExampleSDTApplicationData.FromJson(&ApplicationData)

After logging into the SD app with LoginExternal, I call that proc and that's it. I have the data &GAMExampleSDTApplicationData in the sd

Greetings, Bruno

I found this doc from the wiki that has a more elegant way of doing it too

    
answered by 12.10.2018 в 22:42