pub struct SamlResource<'a> { /* private fields */ }Expand description
client.saml()
Implementations§
Source§impl<'a> SamlResource<'a>
impl<'a> SamlResource<'a>
Sourcepub fn acs(&self) -> Result<Vec<u8>>
pub fn acs(&self) -> Result<Vec<u8>>
Consume a SAML authentication response
POST /saml/acs
Legacy SAML URL. Resolves the single configured SAML provider; with zero or multiple SAML providers it cannot resolve a provider. Prefer the provider-specific /externallogins/{externalLoginId}/saml/acs URL. 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.saml().acs()?;
std::fs::write("ergebnis.bin", &data)?;Sourcepub fn get_login(&self) -> Result<()>
pub fn get_login(&self) -> Result<()>
Start a SAML browser login
GET /saml/login
Legacy SAML URL. Resolves the single configured SAML provider; with zero or multiple SAML providers it cannot resolve a provider. Prefer the provider-specific /externallogins/{externalLoginId}/saml/login URL. 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.saml().get_login()?;Sourcepub fn get_login_with(&self, query: &GetSamlLoginQuery) -> Result<()>
pub fn get_login_with(&self, query: &GetSamlLoginQuery) -> Result<()>
Start a SAML browser login
Like Self::get_login, with query parameters.
GET /saml/login
Legacy SAML URL. Resolves the single configured SAML provider; with zero or multiple SAML providers it cannot resolve a provider. Prefer the provider-specific /externallogins/{externalLoginId}/saml/login URL. 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.
Sourcepub fn get_metadata(&self) -> Result<Vec<u8>>
pub fn get_metadata(&self) -> Result<Vec<u8>>
Get SAML service-provider metadata
GET /saml/metadata
Legacy SAML URL. Resolves the single configured SAML provider; with zero or multiple SAML providers it cannot resolve a provider. Prefer the provider-specific /externallogins/{externalLoginId}/saml/metadata URL. 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.saml().get_metadata()?;
std::fs::write("ergebnis.bin", &data)?;