pub struct ExternalLoginsSamlResource<'a> { /* private fields */ }Expand description
client.external_logins().saml()
Implementations§
Source§impl<'a> ExternalLoginsSamlResource<'a>
impl<'a> ExternalLoginsSamlResource<'a>
pub fn metadata(&self) -> ExternalLoginsSamlMetadataResource<'a>
pub fn test(&self) -> ExternalLoginsSamlTestResource<'a>
Sourcepub fn acs(&self, external_login_id: impl Display) -> Result<Vec<u8>>
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)?;Sourcepub fn create_sls(&self, external_login_id: impl Display) -> Result<()>
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)?;Sourcepub fn create_sls_with(
&self,
external_login_id: impl Display,
query: &PostExternalloginsExternalLoginIdSamlSlsQuery,
) -> Result<()>
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.
Sourcepub fn delete_sls(&self, external_login_id: impl Display) -> Result<()>
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)?;Sourcepub fn delete_sls_with(
&self,
external_login_id: impl Display,
query: &DeleteExternalloginsExternalLoginIdSamlSlsQuery,
) -> Result<()>
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.
Sourcepub fn get_login(&self, external_login_id: impl Display) -> Result<()>
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)?;Sourcepub fn get_login_with(
&self,
external_login_id: impl Display,
query: &GetExternalloginsExternalLoginIdSamlLoginQuery,
) -> Result<()>
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.
Sourcepub fn get_metadata(&self, external_login_id: impl Display) -> Result<Vec<u8>>
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)?;Sourcepub fn get_sls(&self, external_login_id: impl Display) -> Result<()>
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)?;Sourcepub fn get_sls_with(
&self,
external_login_id: impl Display,
query: &GetExternalloginsExternalLoginIdSamlSlsQuery,
) -> Result<()>
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.
Sourcepub fn patch_sls(&self, external_login_id: impl Display) -> Result<()>
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)?;Sourcepub fn patch_sls_with(
&self,
external_login_id: impl Display,
query: &PatchExternalloginsExternalLoginIdSamlSlsQuery,
) -> Result<()>
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.
Sourcepub fn update_sls(&self, external_login_id: impl Display) -> Result<()>
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)?;Sourcepub fn update_sls_with(
&self,
external_login_id: impl Display,
query: &PutExternalloginsExternalLoginIdSamlSlsQuery,
) -> Result<()>
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.