pub struct SpMetadata { /* private fields */ }Expand description
Parsed SP metadata. Derefs to Metadata for the shared accessors.
Implementations§
Source§impl SpMetadata
impl SpMetadata
Sourcepub fn from_xml(xml: &str) -> Result<SpMetadata, OpenSamlError>
pub fn from_xml(xml: &str) -> Result<SpMetadata, OpenSamlError>
Parse SP metadata XML.
Sourcepub fn is_want_assertions_signed(&self) -> bool
pub fn is_want_assertions_signed(&self) -> bool
WantAssertionsSigned flag.
Sourcepub fn is_authn_request_signed(&self) -> bool
pub fn is_authn_request_signed(&self) -> bool
AuthnRequestsSigned flag.
Sourcepub fn get_assertion_consumer_service(&self, binding: Binding) -> Option<String>
pub fn get_assertion_consumer_service(&self, binding: Binding) -> Option<String>
AssertionConsumerService location for binding.
Methods from Deref<Target = Metadata>§
Sourcepub fn get_metadata(&self) -> &str
pub fn get_metadata(&self) -> &str
The original metadata XML.
Sourcepub fn get_entity_id(&self) -> Option<&str>
pub fn get_entity_id(&self) -> Option<&str>
entityID.
Sourcepub fn get_name_id_format(&self) -> Vec<String>
pub fn get_name_id_format(&self) -> Vec<String>
Declared <NameIDFormat> values.
Sourcepub fn x509_certificates(&self, use_: CertUse) -> Vec<String>
pub fn x509_certificates(&self, use_: CertUse) -> Vec<String>
All X.509 certificates declared for use (raw, as written in metadata).
Sourcepub fn get_x509_certificate(&self, use_: CertUse) -> Option<String>
pub fn get_x509_certificate(&self, use_: CertUse) -> Option<String>
First X.509 certificate declared for use.
Sourcepub fn get_single_logout_service(&self, binding: Binding) -> Option<String>
pub fn get_single_logout_service(&self, binding: Binding) -> Option<String>
SingleLogoutService location for binding.
Sourcepub fn export_metadata(&self, path: impl AsRef<Path>) -> Result<(), Error>
pub fn export_metadata(&self, path: impl AsRef<Path>) -> Result<(), Error>
Write the metadata XML to path (samlify exportMetadata).
Sourcepub fn get_support_bindings(&self) -> Vec<Binding>
pub fn get_support_bindings(&self) -> Vec<Binding>
Bindings for which a SingleLogoutService endpoint is declared
(samlify getSupportBindings).
Sourcepub fn verify_signature(
&self,
trusted_certs: &[String],
) -> Result<bool, OpenSamlError>
pub fn verify_signature( &self, trusted_certs: &[String], ) -> Result<bool, OpenSamlError>
Verify this metadata document’s enveloped signature against trusted
certificate(s) (federation trust anchor). Requires crypto-bergshamra.
Trait Implementations§
Source§impl Clone for SpMetadata
impl Clone for SpMetadata
Source§fn clone(&self) -> SpMetadata
fn clone(&self) -> SpMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpMetadata
impl Debug for SpMetadata
Auto Trait Implementations§
impl Freeze for SpMetadata
impl RefUnwindSafe for SpMetadata
impl Send for SpMetadata
impl Sync for SpMetadata
impl Unpin for SpMetadata
impl UnsafeUnpin for SpMetadata
impl UnwindSafe for SpMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more