Adding custom headers to server response pages
You can add headers, which contain information about a custom response, to generated server responses.
Use the macros in the following table to define the information in the custom headers:
| Macro | Description |
|---|---|
TAM_OP |
The operation code for the response. The values for this macro are identical to the values for local response redirects. See Operation for local response redirection. |
AUTHNLEVEL |
Authentication level required by the authentication strength policy (step-up). |
ERROR_CODE |
The hexadecimal value of the error code. |
ERROR_TEXT |
The error message text that is associated with the error code in the message catalog. This text is supplied by WebSEAL. |
USERNAME |
The name of the logged in user. WebSEAL uses the value "unauthenticated" for users who are not logged in. |
CREDATTR{name} |
The value of the user credential attribute that has the specified name. For example, CREDATTR{tagvalue_session_index} returns the session token. |
The http-rsp-header configuration entry defines the headers that are included with the server response pages. This configuration entry is in the [acnt-mgt] stanza of the WebSEAL configuration file.
The format of the configuration entry is:
http-rsp-header = <header-name>:<macro>
where
- <header-name>
- The name of the header to hold the value.
- <macro>
- The type of value that is to be inserted as described in Table 1.
For example, the following configuration entry includes the error
message text from WebSEAL in a header named error_msg:
[acnt-mgt]
http-rsp-header = error_msg:ERROR_TEXTNote: You can specify this configuration entry multiple times to include
more than one custom header in the response.
For example:
[acnt-mgt]
http-rsp-header = error_msg:ERROR_TEXT
http-rsp-header = tam-error-code:ERROR_CODEFor further information, see the http-rsp-header configuration entry in the [acnt-mgt] stanza in the IBM Knowledge Center.