Skip to content

Commit

Permalink
proxy: test missing Extra field
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hutchinson <[email protected]>
  • Loading branch information
Jason Hutchinson authored and arekkas committed Aug 16, 2018
1 parent 76b2d9d commit a4d3d2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions proxy/credentials_issuer_headers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ func TestCredentialsIssuerHeaders(t *testing.T) {
Request: &http.Request{Header: http.Header{"X-User": []string{"admin"}, "X-Issuer": []string{"issuer"}, "X-Audience": []string{"audience"}}},
Match: http.Header{"X-User": []string{"anonymous"}, "X-Issuer": []string{""}, "X-Audience": []string{""}},
},
"Missing Extras": {
Session: &AuthenticationSession{Subject: "foo", Extra: map[string]interface{}{}},
Rule: &rule.Rule{ID: "test-rule6"},
Config: json.RawMessage([]byte(`{"X-Issuer": "{{ print .Extra.iss }}"}`)),
Request: &http.Request{Header: http.Header{}},
Match: http.Header{"X-Issuer": []string{""}},
},
}

for testName, specs := range testMap {
Expand Down

0 comments on commit a4d3d2d

Please sign in to comment.