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

Function testAttributeQuery

schema_attribute_query_test.go:13–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11)
12
13func testAttributeQuery() *AttributeQuery {
14 return &AttributeQuery{
15 ID: "id-query",
16 Version: "2.0",
17 IssueInstant: time.Date(2014, 1, 1, 0, 0, 0, 0, time.UTC),
18 Destination: "https://idp.example.com/saml/aa",
19 Issuer: &Issuer{Value: "https://sp.example.com/saml/metadata"},
20 Subject: &Subject{NameID: &NameID{
21 Format: string(PersistentNameIDFormat),
22 Value: "alice",
23 }},
24 Attributes: []Attribute{
25 {Name: "urn:oid:0.9.2342.19200300.100.1.3", NameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:uri"},
26 {Name: "eduPersonAffiliation", Values: []AttributeValue{{Type: "xs:string", Value: "staff"}}},
27 },
28 }
29}
30
31func TestAttributeQueryElement(t *testing.T) {
32 el := testAttributeQuery().SoapRequest()

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected