pub struct XmlEncryptionPolicy {
pub assertions: AssertionEncryptionPolicy,
/* private fields */
}Expand description
XML encryption policy.
§Examples
Use typed configuration to request encrypted assertions in generated responses. This only configures policy; actual encryption uses the crate’s XML-Enc backend and deployment credentials.
use saml_rs::{EntityId, IdpConfig, SsoEndpoint, XmlEncryptionPolicy, XmlPolicy};
let xml = XmlPolicy {
encryption: XmlEncryptionPolicy::encrypt_assertions(),
..XmlPolicy::default()
};
let idp_builder = IdpConfig::builder(EntityId::try_new("https://idp.example.com/metadata")?)
.sso_endpoint(SsoEndpoint::post("https://idp.example.com/sso")?)
.xml(xml);Fields§
§assertions: AssertionEncryptionPolicyAssertion encryption behavior.
Implementations§
Source§impl XmlEncryptionPolicy
impl XmlEncryptionPolicy
Sourcepub fn encrypt_assertions() -> Self
pub fn encrypt_assertions() -> Self
Enable assertion encryption.
Sourcepub fn allow_insecure_software_rsa_key_transport_decryption() -> Self
pub fn allow_insecure_software_rsa_key_transport_decryption() -> Self
Explicitly allow software RSA key-transport decryption despite
RUSTSEC-2023-0071 timing-risk concerns in the bundled backend.
Sourcepub fn with_insecure_software_rsa_key_transport_decryption_allowed(self) -> Self
pub fn with_insecure_software_rsa_key_transport_decryption_allowed(self) -> Self
Return a copy with the software RSA key-transport risk explicitly allowed.
Trait Implementations§
Source§impl Clone for XmlEncryptionPolicy
impl Clone for XmlEncryptionPolicy
Source§fn clone(&self) -> XmlEncryptionPolicy
fn clone(&self) -> XmlEncryptionPolicy
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 moreimpl Copy for XmlEncryptionPolicy
Source§impl Debug for XmlEncryptionPolicy
impl Debug for XmlEncryptionPolicy
Source§impl Default for XmlEncryptionPolicy
impl Default for XmlEncryptionPolicy
Source§fn default() -> XmlEncryptionPolicy
fn default() -> XmlEncryptionPolicy
Returns the “default value” for a type. Read more
impl Eq for XmlEncryptionPolicy
Source§impl PartialEq for XmlEncryptionPolicy
impl PartialEq for XmlEncryptionPolicy
impl StructuralPartialEq for XmlEncryptionPolicy
Auto Trait Implementations§
impl Freeze for XmlEncryptionPolicy
impl RefUnwindSafe for XmlEncryptionPolicy
impl Send for XmlEncryptionPolicy
impl Sync for XmlEncryptionPolicy
impl Unpin for XmlEncryptionPolicy
impl UnsafeUnpin for XmlEncryptionPolicy
impl UnwindSafe for XmlEncryptionPolicy
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