HowTo: Pass additional parameters to external authentication programs using GAM

Official Content
This documentation is valid for:

The purpose of this article is to explain how additional parameters are passed to external authentication programs using GAM

With GAM External Authentication Type you can send custom information to the external authentication program, regardless of the external authentication version used, which can be GAM External Authentication: version 1.0 or GAM External Authentication: version 2.0.

You need to load the additional information in a variable based on GAMProperty object collection, and assign it to the "Properties" property of a GAMLoginAdditionalParameters object variable (see figure below). The GAMLoginAdditionalParameters object variable is an input of GAMRepository object Login method, used to log in to web applications.


The following is a sample code of a web login object which uses GAM External Authentication: version 2.0.

Before executing the login (which makes the GeneXus Access Manager application call the external authentication program), load an SDT variable (called &CustomProperty in the example) with additional information that needs to be sent to the external program which makes the authentication.

The &CustomProperty variable is based on GAMProperty object.

The information has to be loaded in a collection of GAMLoginAdditionalParameters object (see the figures below in order to understand the structure of these data types).

&CustomProperty.Id  = "Company" //&CustomProperty is based on GAMProperty object
&CustomProperty.Token = "Local"
&CustomProperty.Value = "120"
&AdditionalParameter.Properties.Add(&CustomProperty) //&AdditionalParameter is based on GAMLoginAdditionalParameters
&CustomProperty = new()
&CustomProperty.Id  = "Operation"
&CustomProperty.Token = "Current"
&CustomProperty.Value = "345"
&AdditionalParameter.AuthenticationTypeName = &LogOnTo
&LoginOK = GAMRepository.Login(&UserName, &UserPassword, &AdditionalParameter, &Errors )


This information is received (automatically) in the GAMWSLoginInSDT parameter of the web service when using GAM External Web Services Authentication Type or in the input parameter of the external program when using Custom Authentication Type.

See Also

GAM - External Authentication: version 1.0
GAM - External Authentication: version 2.0