pub struct Login {
pub client: Client,
}Fields§
§client: ClientImplementations§
Source§impl Login
impl Login
Sourcepub async fn get(&self, provider_name: &str, silo_name: &str) -> Result<()>
pub async fn get(&self, provider_name: &str, silo_name: &str) -> Result<()>
Prompt user login.
This function performs a GET to the /login/{silo_name}/{provider_name} endpoint.
Either display a page asking a user for their credentials, or redirect them to their identity provider.
Parameters:
provider_name: &str– Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’. Names cannot be a UUID though they may contain a UUID.silo_name: &str– Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’. Names cannot be a UUID though they may contain a UUID.
Sourcepub async fn consume_credentials<B: Into<Body>>(
&self,
provider_name: &str,
silo_name: &str,
body: B,
) -> Result<()>
pub async fn consume_credentials<B: Into<Body>>( &self, provider_name: &str, silo_name: &str, body: B, ) -> Result<()>
Authenticate a user.
This function performs a POST to the /login/{silo_name}/{provider_name} endpoint.
Either receive a username and password, or some sort of identity provider data (like a SAMLResponse). Use these to set the user’s session cookie.
Parameters:
provider_name: &str– Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’. Names cannot be a UUID though they may contain a UUID.silo_name: &str– Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and ‘-’, and may not end with a ‘-’. Names cannot be a UUID though they may contain a UUID.
Auto Trait Implementations§
impl Freeze for Login
impl !RefUnwindSafe for Login
impl Send for Login
impl Sync for Login
impl Unpin for Login
impl UnsafeUnpin for Login
impl !UnwindSafe for Login
Blanket Implementations§
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