pub struct WsFederationClient { /* private fields */ }Expand description
WS-Federation Relying Party client.
Implementations§
Source§impl WsFederationClient
impl WsFederationClient
Sourcepub fn new(config: WsFederationConfig) -> Result<Self>
pub fn new(config: WsFederationConfig) -> Result<Self>
Create a new WS-Federation client.
Sourcepub fn sign_in_url(&self) -> Result<(String, String)>
pub fn sign_in_url(&self) -> Result<(String, String)>
Generate the WS-Federation sign-in redirect URL.
Returns (url, wctx) where wctx is a random state value for
CSRF protection.
Sourcepub fn sign_out_url(&self) -> String
pub fn sign_out_url(&self) -> String
Generate the WS-Federation sign-out URL.
Sourcepub fn process_sign_in_response(
&self,
wa: &str,
wresult: &str,
wctx: Option<&str>,
expected_wctx: &str,
) -> Result<WsFedSecurityToken>
pub fn process_sign_in_response( &self, wa: &str, wresult: &str, wctx: Option<&str>, expected_wctx: &str, ) -> Result<WsFedSecurityToken>
Process a WS-Federation sign-in response (POST from STS).
The parameters are extracted from the form POST body:
wa: action (should bewsignin1.0)wresult: the<RequestSecurityTokenResponse>XMLwctx: echoed state parameter
Sourcepub async fn fetch_metadata(&self) -> Result<FederationMetadata>
pub async fn fetch_metadata(&self) -> Result<FederationMetadata>
Fetch and parse federation metadata from the metadata URL.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WsFederationClient
impl !RefUnwindSafe for WsFederationClient
impl Send for WsFederationClient
impl Sync for WsFederationClient
impl Unpin for WsFederationClient
impl UnsafeUnpin for WsFederationClient
impl !UnwindSafe for WsFederationClient
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more