git.iko.soy/typeable/oauth2-proxy
on master help sign in
docs: clarify structured claim header serialization (#3501)

Signed-off-by: nightcityblade <jackchen@haloailabs.com>

commit061685fed3b34434aa154ead2812ec2859fcc5c3 authornightcityblade <jackchen@haloailabs.com> dateThu 20 Aug 2026, 13:33 (1 month ago) parentd122f0c
2 files changed+22
docs/docs/configuration/alpha_config.md+11 docs/docs/configuration/alpha_config.md.tmpl+11
docs/docs/configuration/alpha_config.md+11
@@ -167,6 +167,17 @@ injectResponseHeaders:
167167* `claimSource` - `claim` (session claims either from id token or from profile URL)
168168* `secretSource` - `value` (base64), `fromFile` (file path)
169169
170+#### Claim value serialization
171+
172+`claimSource` converts the selected claim into one or more string header values. Scalars
173+produce one value, while arrays produce one value per element. Values that cannot be
174+converted directly to strings, such as objects, are JSON-encoded individually.
175+
176+Each non-empty value is added separately under the configured header name. An array of
177+objects therefore produces multiple header values containing one JSON object each, not a
178+single JSON array. HTTP libraries and intermediaries may expose repeated values as a
179+comma-joined string, so consumers should retrieve and parse each header value separately.
180+
170181**Request option:** `preserveRequestValue: true` retains existing header values
171182
172183**Incompatibility:** Remove legacy flags `pass-user-headers`, `set-xauthrequest`
docs/docs/configuration/alpha_config.md.tmpl+11
@@ -167,6 +167,17 @@ injectResponseHeaders:
167167* `claimSource` - `claim` (session claims either from id token or from profile URL)
168168* `secretSource` - `value` (base64), `fromFile` (file path)
169169
170+#### Claim value serialization
171+
172+`claimSource` converts the selected claim into one or more string header values. Scalars
173+produce one value, while arrays produce one value per element. Values that cannot be
174+converted directly to strings, such as objects, are JSON-encoded individually.
175+
176+Each non-empty value is added separately under the configured header name. An array of
177+objects therefore produces multiple header values containing one JSON object each, not a
178+single JSON array. HTTP libraries and intermediaries may expose repeated values as a
179+comma-joined string, so consumers should retrieve and parse each header value separately.
180+
170181**Request option:** `preserveRequestValue: true` retains existing header values
171182
172183**Incompatibility:** Remove legacy flags `pass-user-headers`, `set-xauthrequest`