pub struct SSOApi<'a> { /* private fields */ }Implementations§
Source§impl<'a> SSOApi<'a>
impl<'a> SSOApi<'a>
Sourcepub async fn list_connections(
&self,
params: ListConnectionsParams,
) -> Result<ConnectionList, Error>
pub async fn list_connections( &self, params: ListConnectionsParams, ) -> Result<ConnectionList, Error>
List Connections
Get a list of all of your existing connections matching the criteria specified.
Sourcepub async fn list_connections_with_options(
&self,
params: ListConnectionsParams,
options: Option<&RequestOptions>,
) -> Result<ConnectionList, Error>
pub async fn list_connections_with_options( &self, params: ListConnectionsParams, options: Option<&RequestOptions>, ) -> Result<ConnectionList, Error>
Variant of Self::list_connections that accepts per-request crate::RequestOptions.
Sourcepub fn list_connections_auto_paging(
&self,
params: ListConnectionsParams,
) -> impl Stream<Item = Result<Connection, Error>> + '_
pub fn list_connections_auto_paging( &self, params: ListConnectionsParams, ) -> impl Stream<Item = Result<Connection, Error>> + '_
Returns an async futures_util::Stream that yields every Connection
across all pages, advancing the after cursor under the hood.
use futures_util::TryStreamExt;
let all: Vec<Connection> = self
.list_connections_auto_paging(params)
.try_collect()
.await?;Sourcepub async fn get_connection(&self, id: &str) -> Result<Connection, Error>
pub async fn get_connection(&self, id: &str) -> Result<Connection, Error>
Get a Connection
Get the details of an existing connection.
Sourcepub async fn get_connection_with_options(
&self,
id: &str,
options: Option<&RequestOptions>,
) -> Result<Connection, Error>
pub async fn get_connection_with_options( &self, id: &str, options: Option<&RequestOptions>, ) -> Result<Connection, Error>
Variant of Self::get_connection that accepts per-request crate::RequestOptions.
Sourcepub async fn delete_connection(&self, id: &str) -> Result<(), Error>
pub async fn delete_connection(&self, id: &str) -> Result<(), Error>
Delete a Connection
Permanently deletes an existing connection. It cannot be undone.
Sourcepub async fn delete_connection_with_options(
&self,
id: &str,
options: Option<&RequestOptions>,
) -> Result<(), Error>
pub async fn delete_connection_with_options( &self, id: &str, options: Option<&RequestOptions>, ) -> Result<(), Error>
Variant of Self::delete_connection that accepts per-request crate::RequestOptions.
Initiate SSO
Initiates the single sign-on flow.
Sourcepub fn get_logout_url(
&self,
params: GetLogoutUrlParams,
) -> Result<String, Error>
pub fn get_logout_url( &self, params: GetLogoutUrlParams, ) -> Result<String, Error>
Logout Redirect
Logout allows to sign out a user from your application by triggering the identity provider sign out flow. This GET endpoint should be a redirection, since the identity provider user will be identified in the browser session.
Before redirecting to this endpoint, you need to generate a short-lived logout token using the Logout Authorize endpoint.
Logout Authorize
You should call this endpoint from your server to generate a logout token which is required for the Logout Redirect endpoint.
Variant of Self::authorize_logout that accepts per-request crate::RequestOptions.
Sourcepub async fn get_profile(
&self,
access_token: impl Into<String>,
) -> Result<Profile, Error>
pub async fn get_profile( &self, access_token: impl Into<String>, ) -> Result<Profile, Error>
Get a User Profile
Exchange an access token for a user’s Profile. Because this profile is returned in the Get a Profile and Token endpoint your application usually does not need to call this endpoint. It is available for any authentication flows that require an additional endpoint to retrieve a user’s profile.
Sourcepub async fn get_profile_with_options(
&self,
access_token: impl Into<String>,
options: Option<&RequestOptions>,
) -> Result<Profile, Error>
pub async fn get_profile_with_options( &self, access_token: impl Into<String>, options: Option<&RequestOptions>, ) -> Result<Profile, Error>
Variant of Self::get_profile that accepts per-request crate::RequestOptions.
Sourcepub async fn get_profile_and_token(
&self,
params: GetProfileAndTokenParams,
) -> Result<SSOTokenResponse, Error>
pub async fn get_profile_and_token( &self, params: GetProfileAndTokenParams, ) -> Result<SSOTokenResponse, Error>
Get a Profile and Token
Get an access token along with the user Profile using the code passed to your Redirect URI.
Sourcepub async fn get_profile_and_token_with_options(
&self,
params: GetProfileAndTokenParams,
options: Option<&RequestOptions>,
) -> Result<SSOTokenResponse, Error>
pub async fn get_profile_and_token_with_options( &self, params: GetProfileAndTokenParams, options: Option<&RequestOptions>, ) -> Result<SSOTokenResponse, Error>
Variant of Self::get_profile_and_token that accepts per-request crate::RequestOptions.