Custom Login Assist files are useful to enable automatic logins to internal Web sites (such as intranet and company portal sites) but can also be used for external sites as well.
You will need the following before creating a Login Assist file.
You can either edit one of the sample XML files supplied or create a new XML file from scratch. However, it is strongly recommended you examine the sample XML files and edit them as needed for your own requirements.
Determine the credentials used for site login by examining the source HTML of the login page. Typically, the site will prompt for a username, password, and possibly other credentials, and may include a button to submit credentials.
The values of for two tags, <AutoLogin>
and <HTMLControl>,
must be set for the page. One <HTMLControl>
tag must be set for each HTML control on the page. Other optional tags may also be included in the XML, but are not necessary.
The <AutoLogin>
tag includes general information about the site, and encloses all other tags. It has these attributes:
url
: Complete URL of the site (for example, http://www.yahoo.com).displayName
: Name displayed in the Login Assist library.
The section specifying all HTML controls is enclosed by the <HTMLControls>
tag.
To determine proper syntax for a given Web page, note the HTML tags for any of the credential prompts on the page, including the attributes of the tag. For example, here is an HTML tag showing a Username entry box.
<INPUT type="text" name="Username" value="" size="15" maxlength="20" tabindex="1" autocomplete="off" id="username" form="LoginForm">
In this example, the Username entry box is a text box, with the id of username, and is part of an HTML form named LoginForm. (Other HTML attributes, such as size and maxlength, are likely to be found in the HTML control, but may be ignored.)
Then, each individual control on the page (username, password, and so on) will receive its own entry in the <HTMLControls>
section, each of which must be enclosed by the tag <HTMLControl>.
For most controls where Open Mobile will pass the user credentials, each <HTMLControl>
tag must include a sub-tag, <Account>,
which points to the Open Mobile account definition used to store the credentials. The <Account>
tag needs a further sub-tag, <AccountField>,
which indicates the field in the account definition used to store the credentials.
A complete <HTMLControl>
tag for the username control shown above, based on the attributes in the HTML tag, would be as follows:
<HTMLControl type="text" id="username" formname="LoginForm"> <Account name="ExampleAccount"> <AccountField>Username</AccountField> </Account> </HTMLControl>
This tag would pass the username to the site, after drawing the credentials from the Username field in the ExampleAccount account definition.
Attribute values for each <HTMLControl>
XML tag correspond to those in the HTML source of the actual login page.
Tag | Description |
---|---|
type | Valid values are text(text entry box), password (password entry box), checkbox (control is a checkbox), submit (used for a button to send credentials to the site, script, autosubmit (used for a button to send credentials to the site when auto-submit is turned on), hidden (control is hidden). |
id | Actual identifier of the HTML control, taken from the HTML source. |
action | (Used only if Type is auto-submit.) This is the action taken by the submit button. If a URL, the results are sent to the URL. |
formname | Form name of the control, taken from the HTML source. |
Some account definitions include the Domain field as a credential type. The Domain field (for example, domain.com) may not passed to a login page using Login Assist.
Auto-Submit for Login Assist is enabled by an <HTMLControl>
tag with a type of autosubmit. However, instead of an id attribute, an action attribute is specified. No <Account>
or <AccountField>
tags are necessary if the attribute type is autosubmit.
For example, this tag would auto-submit credentials to example.com:
HTMLControl type="autosubmit" action="http://www.example.com" formname="LoginForm"/> </HTMLControl>
Some sites include prompts for credentials that are shared across an entire user base. For example, a login page could include a prompt for Company ID, which would be the same for all users from the same company.
To populate a control with a pre-set value, enclose the value after the <HTMLControl>
tag inside the <Literal>
tag. Literal values will be pre-filled for all users with the same Open Mobile profile. No <Account>
or <AccountField> tags are necessary if a literal value is specified.
For example, the login page for a Web site includes entry boxes for Username, and Password and Customer Code. The user is intended to enter an individual username and password, but Customer Code is the same for all users from the same company. In the HTML source for the login page, the Customer Code box has an ID of customer_code. As part of a Login Assist file, this tag for the Customer Code control would pre-fill ‘Example.com’ in the Customer Code box.
<HTMLControl type="text" id="customer_code" formname="formName"> <Literal>Example.com</Literal> </HTMLControl>
To modify one of the sample Login Assist files:
After the file is created, you can add it to an Open Mobile profile.
To add a custom Login Assist file to a profile:
Unlike a Login Assist preset, a custom Login Assist entry is automatically enabled in the profile. In order to remove it from a profile, it must be deleted from the Open Mobile Portal.
To delete a custom Login Assist file from a profile:
Go to: Open Mobile for Windows > Login Assist