Forum Discussion

Tom_Hurst's avatar
Tom_Hurst
Icon for Nimbostratus rankNimbostratus
Jan 10, 2015

APM Multiple Logon Pages

I'm using Access Policy Manager to replace a Firepass unit.

 

I'm authenticating the user by both RSA SecurID and Active Directory.

 

The first logon page is for RSA SecurID, it consists of a Username and (Pin and Token Code) Password Field. Both inputs are Text Fields, the variables are logon.last.username and logon.last.password. The second logon pages is for Active Directory, it consists of Username, Password and Domain Fields. The Username is currently a Text Field, the Password is a Text Field, and the Domain is a Select Field.

 

Both Logon pages use the same Username. My goal is to populate the second logon page Username field with the logon.last.username from the 1st logon page. I also need to be able to edit or modify the Username field. I was able to accomplish the prepopulating with a Select field, but it couldn’t be modified. Does anyone have any idea how to accomplish both with a Text field?

 

2 Replies

  • I was also able to use a Text field and set it to read only to populate the Username field. But I also need to be able to modify the username if needed. Any ideas?

     

  • Is it possible to consolidate these two pages into one? A single page is capable of obtaining the information you are after.

    If it is not, you could use the customization editor in advanced mode, which allows you to edit the HTML page directly. The following block from logon.inc allows for the values of the field to be pre-populated if the value already exists. You could modify this if statement, in the logon.inc file for your second login page to permit the username field to be pre-populated.

    //Enable auto-population only for read-only text field
    if ( ("1" != $fields_settings[$i]["rw"]) && ( "checkbox" == $fields_settings[$i]["type"] || "text" == $fields_settings[$i]["type"] ) ) {
        $fields_settings[$i]["value"] = '%{session.logon.last.'.$fields_settings[$i]["varname"].'}';
    } else {
        $fields_settings[$i]["value"] = '';
    }
    

    Change the first line to the following. I've added an additional OR statement that will equate to true if the current field is the username field.

    if ( ("1" != $fields_settings[$i]["rw"]) && ( "checkbox" == $fields_settings[$i]["type"] || "text" == $fields_settings[$i]["type"] ) || ( "username" == $fields_settings[$i]["name"] ) ) {
    

    I've tested it a bit on my box and it seems to work well, and permits you to change the second username if needed.

    Hope this helps!