pub struct SamlService { /* private fields */ }Expand description
SAML 服务
Implementations§
Source§impl SamlService
impl SamlService
Sourcepub fn new(config: SamlConfig) -> Self
pub fn new(config: SamlConfig) -> Self
创建新的 SAML 服务
Sourcepub fn create_authn_request_url(&self) -> SamlResult<String>
pub fn create_authn_request_url(&self) -> SamlResult<String>
创建认证请求 URL (HTTP Redirect 绑定)
Sourcepub fn create_authn_request(&self) -> SamlResult<SamlAuthnRequest>
pub fn create_authn_request(&self) -> SamlResult<SamlAuthnRequest>
创建认证请求
Sourcepub fn process_authn_response(
&self,
saml_response: &str,
) -> SamlResult<SamlResponse>
pub fn process_authn_response( &self, saml_response: &str, ) -> SamlResult<SamlResponse>
处理认证响应
Sourcepub fn create_logout_request_url(
&self,
name_id: &str,
session_index: Option<&str>,
) -> SamlResult<String>
pub fn create_logout_request_url( &self, name_id: &str, session_index: Option<&str>, ) -> SamlResult<String>
创建登出请求 URL
Sourcepub fn create_logout_request(
&self,
name_id: &str,
session_index: Option<&str>,
) -> SamlResult<SamlLogoutRequest>
pub fn create_logout_request( &self, name_id: &str, session_index: Option<&str>, ) -> SamlResult<SamlLogoutRequest>
创建登出请求
Sourcepub fn process_logout_response(
&self,
saml_response: &str,
) -> SamlResult<SamlLogoutResponse>
pub fn process_logout_response( &self, saml_response: &str, ) -> SamlResult<SamlLogoutResponse>
处理登出响应
Sourcepub fn generate_sp_metadata(&self) -> String
pub fn generate_sp_metadata(&self) -> String
生成 SP 元数据
Sourcepub fn decode_redirect_request(&self, encoded: &str) -> SamlResult<String>
pub fn decode_redirect_request(&self, encoded: &str) -> SamlResult<String>
解码重定向请求
Sourcepub fn config(&self) -> &SamlConfig
pub fn config(&self) -> &SamlConfig
获取配置
Trait Implementations§
Source§impl Clone for SamlService
impl Clone for SamlService
Source§fn clone(&self) -> SamlService
fn clone(&self) -> SamlService
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 SamlService
impl RefUnwindSafe for SamlService
impl Send for SamlService
impl Sync for SamlService
impl Unpin for SamlService
impl UnsafeUnpin for SamlService
impl UnwindSafe for SamlService
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