MCPcopy Create free account
hub / github.com/crewjam/saml / TestValidateLogoutResponseWithoutIssuer

Function TestValidateLogoutResponseWithoutIssuer

assertion_shape_test.go:95–102  ·  view source on GitHub ↗

A LogoutResponse without an Issuer is refused instead of panicking.

(t *testing.T)

Source from the content-addressed store, hash-verified

93
94// A LogoutResponse without an Issuer is refused instead of panicking.
95func TestValidateLogoutResponseWithoutIssuer(t *testing.T) {
96 sp := ServiceProvider{
97 SloURL: mustParseURL("https://sp.example.com/slo"),
98 IDPMetadata: &EntityDescriptor{EntityID: "https://idp.example.com/"},
99 }
100 resp := &LogoutResponse{Version: "2.0", Destination: "https://sp.example.com/slo", IssueInstant: TimeNow()}
101 assert.Check(t, is.ErrorContains(sp.validateLogoutResponse(resp), "issuer does not match"))
102}

Callers

nothing calls this directly

Calls 2

mustParseURLFunction · 0.50

Tested by

no test coverage detected