Skip to content

Commit

Permalink
Fix missing argument and failed test
Browse files Browse the repository at this point in the history
  • Loading branch information
bilcus committed Jul 31, 2018
1 parent f9966d2 commit 8dfbdcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samlsp/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (m *Middleware) RequireAccount(handler http.Handler) http.Handler {

m.ClientState.SetState(w, r, relayState, signedState)
if binding == saml.HTTPRedirectBinding {
redirectURL := req.Redirect(relayState)
redirectURL := req.Redirect(relayState, m.ServiceProvider.EntityID)
w.Header().Add("Location", redirectURL.String())
w.WriteHeader(http.StatusFound)
return
Expand Down
2 changes: 1 addition & 1 deletion service_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ func (test *ServiceProviderTest) TestInvalidAssertions(c *C) {

assertion.Conditions.AudienceRestrictions[0].Audience.Value = "not/our/metadata/url"
err = s.validateAssertion(&assertion, []string{"id-9e61753d64e928af5a7a341a97f420c9"}, TimeNow())
c.Assert(err.Error(), Equals, "Conditions AudienceRestriction does not contain \"https://15661444.ngrok.io/saml2/metadata\"")
c.Assert(err.Error(), Equals, "Conditions AudienceRestriction does not contain \"https://15661444.ngrok.io/saml2/metadata\" or \"\"")
assertion = Assertion{}
xml.Unmarshal(assertionBuf, &assertion)
}
Expand Down

0 comments on commit 8dfbdcb

Please sign in to comment.