Call GXquery 4.0 with credentialsOfficial Content

When integrating GXquery 4.0 on our GeneXus applications, one possible solution is to use the URL of a GXquery 4.0 instance.

URL parameters

The information needed as parameters of the URL is the following:

  • Repository name (unencrypted, accepts empty if there are no multiple repositories or we want to connect to the default repository)
  • GXquery 4.0 User (encrypted)
  • GXquery 4.0 Password (encrypted)

The URL will look as follows: http://<Host>/<BaseURL>/login.aspx?<Repository>,<GXquery User>,<GXquery Password>

Example

For example, we can call it on a web panel as shown below:

Event 'CallGXquery'
     &URLHttp = 'http://localhost/GXqueryDemo/login.aspx?'
     &Encryptionkey = 'b2aff1f14433431fc96e96d7ec6013cb'
     &GXqueryUser = Encrypt64('Administrator',&Encryptionkey)
     &GXqueryPassword = Encrypt64('administrator123',&Encryptionkey)
     &Repository = 'Repository1'
     Link(&URLHttp,&Repository,&GXqueryUser,&GXqueryPassword)
EndEvent

The URL will look as follows: http://localhost/GXqueryDemo/login.aspx?Repository1,os7bdYRj+MrVVSmBFuVEbA==,+z8sL5I72oM/YwTB24ad+w==

Encryption Key

To encrypt the GXquery 4.0 User and Password we need to use the Encrypt64 Function of GeneXus, using the encryption key from the repository on GXquery as a parameter:

Encryption pass

Note: The possible values of the encryption key are given by the GetEncryptionKey Function of GeneXus.

Availability

This feature is available as of GXquery 4.0 Upgrade 2.

See also

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.