Add rules to define an HTTP basic authentication policy
that is named worklight-basicauth.
Table 1. HTTP Basic Authentication propertiesProperty |
Value |
Policy Name |
worklight-basicauth |
Order of configured rules |
- worklight-basicauth_rule_0: see Table 2
- worklight-basicauth_rule_3: see Table 5
- worklight-basicauth_rule_1: see Table 3
- worklight-basicauth_rule_2: see Table 4
|
Table 2. Properties
of worklight-basicauth_rule_0. When
processing HTML content, skip processing with the icon that is associated
with the website or the web page.Property |
Value |
Direction |
Client to Server or Both
Directions. |
Match |
- Type = URL
- Pattern = /favicon.ico
|
Advanced |
"Set Variable" -> var://service/mpgw/skip-backside
= 1 |
Result |
Not applicable. |
Table 3. Properties
of worklight-basicauth_rule_1. Handle
end-user authentication if an LTPA token does not exist.Property |
Value |
Direction |
Client to Server. |
Match |
|
AAA |
BasicAuth2LTPA
|
Result |
Not applicable. |
Table 4. Properties
of worklight-basicauth_rule_2. Handle
both the redirect and content-type reset on the response side.Property |
Value |
Direction |
Server to Client. |
Match |
|
Filter |
Provide a custom stylesheet that handles redirect
and content-type rewrite. For a sample redirect stylesheet, see Sample redirect stylesheet.
|
Result |
Not applicable. |
Table 5. Properties
of worklight-basicauth_rule_3. Because
the policy is applied to each request, the rules must be ordered such
as to ensure that an LTPA token is verified if it exists in the HTTP
request. If no token is available, proceed to the next rule and authenticate
the user.Property |
Value |
Direction |
Client to Server. |
Match |
- Type = HTTP
- HTTP header tag = Cookie
- HTTP value match = *LtpaToken*
|
AAA |
VerifyLTPA
|
Result |
Not applicable. |