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

Method Element

schema.go:898–916  ·  view source on GitHub ↗

Element returns an etree.Element representing the object in XML form.

()

Source from the content-addressed store, hash-verified

896
897// Element returns an etree.Element representing the object in XML form.
898func (s *SubjectConfirmationData) Element() *etree.Element {
899 el := etree.NewElement("saml:SubjectConfirmationData")
900 if !s.NotBefore.IsZero() {
901 el.CreateAttr("NotBefore", s.NotBefore.Format(timeFormat))
902 }
903 if !s.NotOnOrAfter.IsZero() {
904 el.CreateAttr("NotOnOrAfter", s.NotOnOrAfter.Format(timeFormat))
905 }
906 if s.Recipient != "" {
907 el.CreateAttr("Recipient", s.Recipient)
908 }
909 if s.InResponseTo != "" {
910 el.CreateAttr("InResponseTo", s.InResponseTo)
911 }
912 if s.Address != "" {
913 el.CreateAttr("Address", s.Address)
914 }
915 return el
916}
917
918// MarshalXML implements xml.Marshaler
919func (s *SubjectConfirmationData) MarshalXML(e *xml.Encoder, start xml.StartElement) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected