pub fn new(
        hostname: &str,
        baseurl: Option<String>,
        entity_id: Option<String>,
        logout_suffix: Option<String>,
        redirect_suffix: Option<String>,
        post_suffix: Option<String>,
        x509_certificate: Option<X509>,
    ) -> Self {
        let hostname = hostname.to_string();
        let baseurl = baseurl.unwrap_or(format!("https://{}/SAML", hostname));
        let entity_id = match entity_id {
            Some(value) => value,
            None => hostname.to_string(),
        };
        let logout_suffix_default = String::from("/Logout");
        SamlMetadata {
            hostname,
            baseurl,
            entity_id,
            logout_suffix: logout_suffix.unwrap_or(logout_suffix_default),
            redirect_suffix: redirect_suffix.unwrap_or_else(|| String::from("/Redirect")),
            post_suffix: post_suffix.unwrap_or_else(|| String::from("/POST")),
            x509_certificate,
        }
    }
/// Create a new SamlMetadata object for your IdP
Create a new SamlMetadata object for your IdP
Create a new SamlMetadata object for your IdP
pub fn new(
        hostname: &str,
        baseurl: Option<String>,
        entity_id: Option<String>,
        logout_suffix: Option<String>,
        redirect_suffix: Option<String>,
        post_suffix: Option<String>,
        x509_certificate: Option<X509>,
    ) -> Self {
        let hostname = hostname.to_string();
        let baseurl = baseurl.unwrap_or(format!("https://{}/SAML", hostname));
        let entity_id = match entity_id {
            Some(value) => value,
            None => hostname.to_string(),
        };
        let logout_suffix_default = String::from("/Logout");
        SamlMetadata {
            hostname,
            baseurl,
            entity_id,
            logout_suffix: logout_suffix.unwrap_or(logout_suffix_default),
            redirect_suffix: redirect_suffix.unwrap_or_else(|| String::from("/Redirect")),
            post_suffix: post_suffix.unwrap_or_else(|| String::from("/POST")),
            x509_certificate,
        }
    }
pub fn new ( hostname : & str , baseurl : Option < String > , entity_id : Option < String > , logout_suffix : Option < String > , redirect_suffix : Option < String > , post_suffix : Option < String > , x509_certificate : Option < X509 > , ) -> Self { let hostname = hostname . to_string ( ) ; let baseurl = baseurl . unwrap_or ( format ! ( " " hostname ) ) ; let entity_id = match entity_id { Some ( value ) => value , None => hostname . to_string ( ) , } ; let logout_suffix_default = String :: from ( " " ) ; SamlMetadata { hostname , baseurl , entity_id , logout_suffix : logout_suffix . unwrap_or ( logout_suffix_default ) , redirect_suffix : redirect_suffix . unwrap_or_else ( | | String :: from ( " " ) ) , post_suffix : post_suffix . unwrap_or_else ( | | String :: from ( " " ) ) , x509_certificate , } }
Create a new SamlMetadata object for your IdP
Create a new SamlMetadata object for your IdP
hostname
&str
baseurl
Option<String>
entity_id
Option<String>
logout_suffix
Option<String>
redirect_suffix
Option<String>
post_suffix
Option<String>
x509_certificate
Option<X509>
hostname
&str
baseurl
Option<String>
entity_id
Option<String>
logout_suffix
Option<String>
redirect_suffix
Option<String>
post_suffix
Option<String>
x509_certificate
Option<X509>