@@ -0,0 +1,44 @@
3+// Header represents an individual header that will be added to a request or
6+ // Name is the header name to be used for this set of values.
7+ // Names should be unique within a list of Headers.
8+ Name string `json:"name"`
10+ // PreserveRequestValue determines whether any values for this header
11+ // should be preserved for the request to the upstream server.
12+ // This option only takes effet on injected request headers.
13+ // Defaults to false (headers that match this header will be stripped).
14+ PreserveRequestValue bool `json:"preserveRequestValue"`
16+ // Values contains the desired values for this header
17+ Values []HeaderValue `json:"values"`
20+// HeaderValue represents a single header value and the sources that can
21+// make up the header value
22+type HeaderValue struct {
23+ // Allow users to load the value from a secret source
26+ // Allow users to load the value from a session claim
30+// ClaimSource allows loading a header value from a claim within the session
31+type ClaimSource struct {
32+ // Claim is the name of the claim in the session that the value should be
34+ Claim string `json:"claim,omitempty"`
36+ // Prefix is an optional prefix that will be prepended to the value of the
37+ // claim if it is non-empty.
38+ Prefix string `json:"prefix,omitempty"`
40+ // BasicAuthPassword converts this claim into a basic auth header.
41+ // Note the value of claim will become the basic auth username and the
42+ // basicAuthPassword will be used as the password value.
43+ BasicAuthPassword *SecretSource