Plans and prices
About us

How can I authenticate, from my GeneXus application using the GAM against users in a GXportal site?

The objective is to solve user authentication in a GeneXus application that uses the GAM, but the authentication is to be done against the base of users defined in a site designed in GXportal. 

The first thing to do is go to the GAM's backend and define an external authentication type, set as follows: 

The setting must include the following values:
  • Name: configure a name for this kind of authentication.
  • Function: to validate only against users in GXportal set this field with the value “Only Authentication”. If we also want to get information on the roles assigned to users in GXportal, then it should be set with the value “Authentication and Roles” (the functioning of the role mapping is shown below).
  • Description: configure the description of the authentication type that will be used to identify it in the GAM’s backend.
  • Web Service Version: it must be set with the value “Version 1.0).
  • Private encryption key: this key must be generated from the site’s backend in GXportal, in the control panel, from the Security option. There, from the External Web Service tab press the “Generate key” button and then press Save to save the value. Then copy the key generated and use it in the GAM’s backend to set the field Private encryption key.
  • Server name: indicate the domain of the site against which we want to validate users.
  • Server port: specify the port where the site is executed, usually port 80.
  • Base URL: virtual directory for the case where the site’s URL is of the type www.domain.com/directorio_virtual, where we must indicate the value directorio_virtual.
  • Secure protocol: when the site is executed on HTTPS, that is secure protocol, we must set this field with value “Yes”.
  • Web service name: must be set with value agxpwsauthenticationv1, and to make sure that the service is installed you can try accessing it with URL www.dominio.com/agxpwsauthenticationv1.aspx?wsdl.
  • Web service extension: must be set with value aspx when using GXportal for .NET platform. Otherwise, it is not necessary to set this value.
After the configuration above has been set, everything’s ready in the GAM’s backend to test the user authentication of the GeneXus application against the site’s database in GXportal.

Mapping of roles that user has in GXportal and roles defined in the GAM

If the setting in the GAM indicates that the user roles defined in GXportal are to be obtained, then there is the possibility to map those roles with which they are defined in GXportal.

To do so we must go to the option Settings → Roles in GXportal backend, and enable the column showing identifiers. With those IDs we configure the “external id” property in the GAM’s roles backend, as shown here.

This causes, upon doing login in the application, the assignment to the user of its roles in GXportal mapped with the GAM.


    Wiki home
    Recents changes
    Do you want to know the latest news? Follow us on

    GXportal Online
    GXportal Corporate
    Frecuently Asked Questions
    Free online course
    About us
    Terms of use
    © All rights reserved. GeneXus TM is registered to GeneXus S.A. | Privacy Policy | Contact information