pub struct SamlMetadata {
    pub hostname: String,
    pub baseurl: String,
    pub entity_id: String,
    pub logout_suffix: String,
    pub redirect_suffix: String,
    pub post_suffix: String,
    pub x509_certificate: Option<X509>,
}
Expand description

Stores the required data for generating a SAML metadata XML file

Fields

hostname: String

Hostname of the issuer, used for URLs etc

baseurl: String

Set this as the base of the suffix-items elsewhere

entity_id: String

entityID is transmitted in all requests

Every SAML system entity has an entity ID, a globally-unique identifier used in software configurations, relying-party databases, and client-side cookies. On the wire, every SAML protocol message contains the entity ID of the issuer. If you don’t set it, it’ll fall back to the bare hostname.

logout_suffix: String

Appended to the baseurl when using the SamlMetadata::logout_url function

redirect_suffix: String

Appended to the baseurl when using the SamlMetadata::redirect_url function

post_suffix: String

Appended to the baseurl when using the SamlMetadata::post_url function

x509_certificate: Option<X509>

Public certificate for signing/encryption

Implementations

Create a new SamlMetadata object for your IdP

really simple version with a self-signed certificate based on just the hostname. Mainly for testing.

return the generated Logout URL based on the baseurl + logout_suffix

return the generated redirect URL based on the baseurl + redirect_suffix

return the generated post URL based on the baseurl + post_suffix

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.