Element returns an etree.Element representing the object in XML form.
()
| 21 | |
| 22 | // Element returns an etree.Element representing the object in XML form. |
| 23 | func (r *RequestedAuthnContext) Element() *etree.Element { |
| 24 | el := etree.NewElement("samlp:RequestedAuthnContext") |
| 25 | el.CreateAttr("Comparison", r.Comparison) |
| 26 | elContext := etree.NewElement("saml:AuthnContextClassRef") |
| 27 | elContext.SetText(r.AuthnContextClassRef) |
| 28 | el.AddChild(elContext) |
| 29 | return el |
| 30 | } |
| 31 | |
| 32 | // AuthnRequest represents the SAML object of the same name, a request from a service provider |
| 33 | // to authenticate a user. |
no outgoing calls