pub struct ServiceProviderConfig {
pub entity_id: String,
pub acs_url: String,
pub slo_url: Option<String>,
pub name_id_format: NameIdFormat,
pub required_attributes: Vec<String>,
pub optional_attributes: Vec<String>,
pub want_assertions_signed: bool,
pub want_response_signed: bool,
pub private_key: Option<String>,
pub certificate: Option<String>,
}Expand description
SAML 服务提供者 (SP) 配置
Fields§
§entity_id: String实体 ID
acs_url: StringACS (Assertion Consumer Service) URL
slo_url: Option<String>SLO (Single Logout) URL
name_id_format: NameIdFormat名称 ID 格式
required_attributes: Vec<String>需要的属性
optional_attributes: Vec<String>可选属性
want_assertions_signed: bool是否需要签名
want_response_signed: bool是否需要响应签名
private_key: Option<String>私钥 (用于签名请求)
certificate: Option<String>证书
Implementations§
Source§impl ServiceProviderConfig
impl ServiceProviderConfig
Sourcepub fn with_slo_url(self, url: impl Into<String>) -> Self
pub fn with_slo_url(self, url: impl Into<String>) -> Self
设置 SLO URL
Sourcepub fn with_name_id_format(self, format: NameIdFormat) -> Self
pub fn with_name_id_format(self, format: NameIdFormat) -> Self
设置名称 ID 格式
Sourcepub fn add_required_attribute(self, attr: impl Into<String>) -> Self
pub fn add_required_attribute(self, attr: impl Into<String>) -> Self
添加需要的属性
Sourcepub fn add_optional_attribute(self, attr: impl Into<String>) -> Self
pub fn add_optional_attribute(self, attr: impl Into<String>) -> Self
添加可选属性
Trait Implementations§
Source§impl Clone for ServiceProviderConfig
impl Clone for ServiceProviderConfig
Source§fn clone(&self) -> ServiceProviderConfig
fn clone(&self) -> ServiceProviderConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServiceProviderConfig
impl RefUnwindSafe for ServiceProviderConfig
impl Send for ServiceProviderConfig
impl Sync for ServiceProviderConfig
impl Unpin for ServiceProviderConfig
impl UnsafeUnpin for ServiceProviderConfig
impl UnwindSafe for ServiceProviderConfig
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