pub struct AuthHandler;Expand description
Handles CEDA authentication operations
Implementations§
Source§impl AuthHandler
impl AuthHandler
Sourcepub async fn authenticate(
client: &Client,
username: &str,
password: &str,
) -> AuthResult<()>
pub async fn authenticate( client: &Client, username: &str, password: &str, ) -> AuthResult<()>
Performs CEDA authentication using the proven pattern
This follows the working authentication pattern with CSRF token extraction. It fetches the login page, extracts the CSRF token, and submits the form.
§Arguments
client- The HTTP client to use for authenticationusername- CEDA usernamepassword- CEDA password
§Errors
Returns AuthError if:
- Login page cannot be fetched
- CSRF token cannot be extracted
- Form submission fails
- Login credentials are invalid
- Authentication verification fails
Auto Trait Implementations§
impl Freeze for AuthHandler
impl RefUnwindSafe for AuthHandler
impl Send for AuthHandler
impl Sync for AuthHandler
impl Unpin for AuthHandler
impl UnsafeUnpin for AuthHandler
impl UnwindSafe for AuthHandler
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