pub fn add_to_xmlevent<W: Write>(&self, writer: &mut EventWriter<W>) {
        // start authn statement
        let _ = match self.expiry {
            Some(expiry) => write_event(
                XmlEvent::start_element(("saml", "AuthnStatement"))
                    .attr(
                        "AuthnInstant",
                        &self.instant.to_rfc3339_opts(SecondsFormat::Secs, true),
                    )
                    .attr(
                        "SessionNotOnOrAfter",
                        &expiry.to_rfc3339_opts(SecondsFormat::Secs, true),
                    )
                    .attr("SessionIndex", self.session_index.as_str())
                    .into(),
                writer,
            ),
            None => write_event(
                XmlEvent::start_element(("saml", "AuthnStatement"))
                    .attr(
                        "AuthnInstant",
                        &self.instant.to_rfc3339_opts(SecondsFormat::Secs, true),
                    )
                    .attr("SessionIndex", self.session_index.as_str())
                    .into(),
                writer,
            ),
        };

        write_event(
            XmlEvent::start_element(("saml", "AuthnContext")).into(),
            writer,
        );
        write_event(
            XmlEvent::start_element(("saml", "AuthnContextClassRef")).into(),
            writer,
        );
        write_event(XmlEvent::characters(self.classref.as_str()), writer);
        write_event(XmlEvent::end_element().into(), writer);
        write_event(XmlEvent::end_element().into(), writer);

        // end authn statement
        write_event(XmlEvent::end_element().into(), writer);
    }
/// Used elsewhere in the API to add an AuthNStatement to the Response XML
Used elsewhere in the API to add an AuthNStatement to the Response XML
Used elsewhere in the API to add an AuthNStatement to the Response XML
pub fn add_to_xmlevent<W: Write>(&self, writer: &mut EventWriter<W>) {
        // start authn statement
        let _ = match self.expiry {
            Some(expiry) => write_event(
                XmlEvent::start_element(("saml", "AuthnStatement"))
                    .attr(
                        "AuthnInstant",
                        &self.instant.to_rfc3339_opts(SecondsFormat::Secs, true),
                    )
                    .attr(
                        "SessionNotOnOrAfter",
                        &expiry.to_rfc3339_opts(SecondsFormat::Secs, true),
                    )
                    .attr("SessionIndex", self.session_index.as_str())
                    .into(),
                writer,
            ),
            None => write_event(
                XmlEvent::start_element(("saml", "AuthnStatement"))
                    .attr(
                        "AuthnInstant",
                        &self.instant.to_rfc3339_opts(SecondsFormat::Secs, true),
                    )
                    .attr("SessionIndex", self.session_index.as_str())
                    .into(),
                writer,
            ),
        };
        write_event(
            XmlEvent::start_element(("saml", "AuthnContext")).into(),
            writer,
        );
        write_event(
            XmlEvent::start_element(("saml", "AuthnContextClassRef")).into(),
            writer,
        );
        write_event(XmlEvent::characters(self.classref.as_str()), writer);
        write_event(XmlEvent::end_element().into(), writer);
        write_event(XmlEvent::end_element().into(), writer);
        // end authn statement
        write_event(XmlEvent::end_element().into(), writer);
    }
pub fn add_to_xmlevent < W : Write > ( & self , writer : & mut EventWriter < W > ) { // start authn statement let _ = match self . expiry { Some ( expiry ) => write_event ( XmlEvent :: start_element ( ( " " , " " ) ) . attr ( " " , & self . instant . to_rfc3339_opts ( SecondsFormat :: Secs , true ) , ) . attr ( " " , & expiry . to_rfc3339_opts ( SecondsFormat :: Secs , true ) , ) . attr ( " " , self . session_index . as_str ( ) ) . into ( ) , writer , ) , None => write_event ( XmlEvent :: start_element ( ( " " , " " ) ) . attr ( " " , & self . instant . to_rfc3339_opts ( SecondsFormat :: Secs , true ) , ) . attr ( " " , self . session_index . as_str ( ) ) . into ( ) , writer , ) , } ; write_event ( XmlEvent :: start_element ( ( " " , " " ) ) . into ( ) , writer , ) ; write_event ( XmlEvent :: start_element ( ( " " , " " ) ) . into ( ) , writer , ) ; write_event ( XmlEvent :: characters ( self . classref . as_str ( ) ) , writer ) ; write_event ( XmlEvent :: end_element ( ) . into ( ) , writer ) ; write_event ( XmlEvent :: end_element ( ) . into ( ) , writer ) ; // end authn statement write_event ( XmlEvent :: end_element ( ) . into ( ) , writer ) ; }
Used elsewhere in the API to add an AuthNStatement to the Response XML
Used elsewhere in the API to add an AuthNStatement to the Response XML
&self
writer
&mut EventWriter<W>
&self
writer
&mut EventWriter<W>