Accepting Login Names with Different Formats
You can configure the SAE to accept login names of different formats. For example, the format subscriberName@domainName is a common format for the login name of subscribers who connect through PPP; however, other subscribers may use other formats, such as domainName/userName.
To configure the SAE to accept these different formats, you specify a set of properties that parse the login name to obtain the userName and domainName objects for the subscriber. Each property contains a regular expression that includes one or two subexpressions—independent expressions in the complete regular expression—each of which is enclosed in parentheses.
The property for login name parsing has the form:
LoginName.parser.<number>.<userGroup>[.<domainGroup>] = \ <regular expression>number
- Number that specifies the order in which the SAE should apply the property when it parses the loginName. The SAE applies the properties in the specified order from lowest to highest.
userGroup
- Number of the backreference that extracts the username.
- In the following example, the userGroup backreference is set to 1. This means that the first backreference in the expression ([^@]*) identifies the username:
LoginName.parser.1.1.2 = ([^@]*)@(.*)domainGroup
- Optional number of the backreference that extracts the domain name.
- In the following example, the domainGroup backreference is set to 1. Therefore, the first backreference in the expression ([^/]*) identifies the domain name:
LoginName.parser.2.2.1 = ([^/]*)/(.*)regular expression
- Regular expression that includes one or two subexpressions—independent expressions in the complete regular expression—each of which is enclosed in parentheses.
- When you define regular expressions for a domain name parser, you must include four backslashes (\\\\) to effect a single backslash. For example, suppose you define the following parser:
LoginName.parser.1.2.1 = (.*?)[\\\\](.*?)This example parses the login name isp1\jane as:
domain name: isp1username: jane
- For more information about using regular expressions for this feature, see:
http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.htmlDefault Login Parser Properties
Table 10 shows default properties that the SAE uses to parse login names. Table 11 shows some examples of subscriber and domain names obtained through the default parsing properties.