Skip to main content

ExternalLoginsSamlResource

Struct ExternalLoginsSamlResource 

Source
pub struct ExternalLoginsSamlResource<'a> { /* private fields */ }
Expand description

client.external_logins().saml()

Implementations§

Source§

impl<'a> ExternalLoginsSamlResource<'a>

Source

pub fn metadata(&self) -> ExternalLoginsSamlMetadataResource<'a>

Source

pub fn test(&self) -> ExternalLoginsSamlTestResource<'a>

Source

pub fn acs(&self, external_login_id: impl Display) -> Result<Vec<u8>>

Consume a SAML authentication response

POST /externallogins/{externalLoginId}/saml/acs

Public assertion-consumer callback for the identity provider’s form POST. Validates the SAML response and maps the external identity to a ChurchTools person. Successful login redirects to the stored destination or the installation landing page; identities needing account linking are redirected into that flow instead. Normal login requires a visible provider. Administrator test flows can use hidden providers and return a small HTML page that closes the popup, without logging the tested identity in. Test failures can also return that 200 HTML page: read the separate test-result endpoint for the outcome. A pending administrator test with missing RelayState also returns the popup page. Normal failures return 401 as localized text or an HTML error page, never the usual JSON error envelope.

§Example
let data = client.external_logins().saml().acs(7)?;
std::fs::write("ergebnis.bin", &data)?;
Source

pub fn create_sls(&self, external_login_id: impl Display) -> Result<()>

Process a SAML single-logout message

POST /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Use Self::create_sls_with to pass query parameters.

§Example
client.external_logins().saml().create_sls(7)?;
Source

pub fn create_sls_with( &self, external_login_id: impl Display, query: &PostExternalloginsExternalLoginIdSamlSlsQuery, ) -> Result<()>

Process a SAML single-logout message

Like Self::create_sls, with query parameters.

POST /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Source

pub fn delete_sls(&self, external_login_id: impl Display) -> Result<()>

Process a SAML single-logout message

DELETE /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Use Self::delete_sls_with to pass query parameters.

§Example
client.external_logins().saml().delete_sls(7)?;
Source

pub fn delete_sls_with( &self, external_login_id: impl Display, query: &DeleteExternalloginsExternalLoginIdSamlSlsQuery, ) -> Result<()>

Process a SAML single-logout message

Like Self::delete_sls, with query parameters.

DELETE /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Source

pub fn get_login(&self, external_login_id: impl Display) -> Result<()>

Start a SAML browser login

GET /externallogins/{externalLoginId}/saml/login

Starts the browser-based SAML login for a visible SAML external-login provider. Redirects to the configured identity provider with a SAML authentication request and an opaque RelayState. An optional post-login redirect is saved in the browser session, so the callback must retain that session. Only absolute URLs on this installation’s origin and within its base path are accepted; invalid redirect values are ignored. Missing, hidden or invalid providers and other setup failures produce a localized 404 response. No login or JSON access token is returned by this endpoint itself.

Use Self::get_login_with to pass query parameters.

§Example
client.external_logins().saml().get_login(7)?;
Source

pub fn get_login_with( &self, external_login_id: impl Display, query: &GetExternalloginsExternalLoginIdSamlLoginQuery, ) -> Result<()>

Start a SAML browser login

Like Self::get_login, with query parameters.

GET /externallogins/{externalLoginId}/saml/login

Starts the browser-based SAML login for a visible SAML external-login provider. Redirects to the configured identity provider with a SAML authentication request and an opaque RelayState. An optional post-login redirect is saved in the browser session, so the callback must retain that session. Only absolute URLs on this installation’s origin and within its base path are accepted; invalid redirect values are ignored. Missing, hidden or invalid providers and other setup failures produce a localized 404 response. No login or JSON access token is returned by this endpoint itself.

Source

pub fn get_metadata(&self, external_login_id: impl Display) -> Result<Vec<u8>>

Get SAML service-provider metadata

GET /externallogins/{externalLoginId}/saml/metadata

Returns the XML metadata that an identity-provider administrator uses to configure ChurchTools as a SAML service provider. The entity ID, assertion-consumer URL and logout URL refer to this external-login provider. This endpoint is public and also works for a hidden provider, allowing setup before enabling login. Any provider/configuration/metadata-generation failure is returned as 404 with localized text, not a JSON error envelope.

§Example
let data = client.external_logins().saml().get_metadata(7)?;
std::fs::write("ergebnis.bin", &data)?;
Source

pub fn get_sls(&self, external_login_id: impl Display) -> Result<()>

Process a SAML single-logout message

GET /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. A redirect does not confirm successful logout.

Use Self::get_sls_with to pass query parameters.

§Example
client.external_logins().saml().get_sls(7)?;
Source

pub fn get_sls_with( &self, external_login_id: impl Display, query: &GetExternalloginsExternalLoginIdSamlSlsQuery, ) -> Result<()>

Process a SAML single-logout message

Like Self::get_sls, with query parameters.

GET /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. A redirect does not confirm successful logout.

Source

pub fn patch_sls(&self, external_login_id: impl Display) -> Result<()>

Process a SAML single-logout message

PATCH /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Use Self::patch_sls_with to pass query parameters.

§Example
client.external_logins().saml().patch_sls(7)?;
Source

pub fn patch_sls_with( &self, external_login_id: impl Display, query: &PatchExternalloginsExternalLoginIdSamlSlsQuery, ) -> Result<()>

Process a SAML single-logout message

Like Self::patch_sls, with query parameters.

PATCH /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Source

pub fn update_sls(&self, external_login_id: impl Display) -> Result<()>

Process a SAML single-logout message

PUT /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Use Self::update_sls_with to pass query parameters.

§Example
client.external_logins().saml().update_sls(7)?;
Source

pub fn update_sls_with( &self, external_login_id: impl Display, query: &PutExternalloginsExternalLoginIdSamlSlsQuery, ) -> Result<()>

Process a SAML single-logout message

Like Self::update_sls, with query parameters.

PUT /externallogins/{externalLoginId}/saml/sls

Processes a signed SAML HTTP-Redirect single-logout message for a visible provider. Prefer the GET binding for new integrations. A redirect does not confirm successful logout.

Trait Implementations§

Source§

impl<'a> Clone for ExternalLoginsSamlResource<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for ExternalLoginsSamlResource<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more