diff --git a/mcaptcha/api/v1/auth/fn.services.html b/mcaptcha/api/v1/auth/fn.services.html index ca503749..aeec7065 100644 --- a/mcaptcha/api/v1/auth/fn.services.html +++ b/mcaptcha/api/v1/auth/fn.services.html @@ -4,5 +4,5 @@
-

Function mcaptcha::api::v1::auth::services

source · []
pub fn services(cfg: &mut ServiceConfig)
+

Function mcaptcha::api::v1::auth::services

source · []
pub fn services(cfg: &mut ServiceConfig)
\ No newline at end of file diff --git a/mcaptcha/api/v1/auth/index.html b/mcaptcha/api/v1/auth/index.html index a50aef07..3b88d9ff 100644 --- a/mcaptcha/api/v1/auth/index.html +++ b/mcaptcha/api/v1/auth/index.html @@ -4,7 +4,7 @@
-

Module mcaptcha::api::v1::auth

source · []

Modules

+

Module mcaptcha::api::v1::auth

source · []

Modules

Structs

Functions

diff --git a/mcaptcha/api/v1/auth/runners/fn.login_runner.html b/mcaptcha/api/v1/auth/runners/fn.login_runner.html index 58979281..8e620e44 100644 --- a/mcaptcha/api/v1/auth/runners/fn.login_runner.html +++ b/mcaptcha/api/v1/auth/runners/fn.login_runner.html @@ -4,6 +4,6 @@
pub async fn login_runner(
    payload: Login,
    data: &AppData
) -> Result<String, ServiceError>
Expand description

returns Ok(()) when everything checks out and the user is authenticated. Erros otherwise

+

Function mcaptcha::api::v1::auth::runners::login_runner

source · []
pub async fn login_runner(
    payload: Login,
    data: &AppData
) -> Result<String, ServiceError>
Expand description

returns Ok(()) when everything checks out and the user is authenticated. Erros otherwise

\ No newline at end of file diff --git a/mcaptcha/api/v1/auth/runners/fn.register_runner.html b/mcaptcha/api/v1/auth/runners/fn.register_runner.html index 92fb36dd..ba510476 100644 --- a/mcaptcha/api/v1/auth/runners/fn.register_runner.html +++ b/mcaptcha/api/v1/auth/runners/fn.register_runner.html @@ -4,5 +4,5 @@
pub async fn register_runner(
    payload: &Register,
    data: &AppData
) -> Result<(), ServiceError>
+

Function mcaptcha::api::v1::auth::runners::register_runner

source · []
pub async fn register_runner(
    payload: &Register,
    data: &AppData
) -> Result<(), ServiceError>
\ No newline at end of file diff --git a/mcaptcha/api/v1/auth/runners/index.html b/mcaptcha/api/v1/auth/runners/index.html index d36246a8..b377cc90 100644 --- a/mcaptcha/api/v1/auth/runners/index.html +++ b/mcaptcha/api/v1/auth/runners/index.html @@ -4,7 +4,7 @@

Structs

+

Module mcaptcha::api::v1::auth::runners

source · []

Structs

Functions

returns Ok(()) when everything checks out and the user is authenticated. Erros otherwise

diff --git a/mcaptcha/api/v1/auth/struct.login.html b/mcaptcha/api/v1/auth/struct.login.html index b82a877d..edd1ffeb 100644 --- a/mcaptcha/api/v1/auth/struct.login.html +++ b/mcaptcha/api/v1/auth/struct.login.html @@ -4,7 +4,7 @@
-

Struct mcaptcha::api::v1::auth::login

source · []
pub struct login;

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Struct mcaptcha::api::v1::auth::login

source · []
pub struct login;

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

diff --git a/mcaptcha/api/v1/auth/struct.register.html b/mcaptcha/api/v1/auth/struct.register.html index dc715b29..7fbda645 100644 --- a/mcaptcha/api/v1/auth/struct.register.html +++ b/mcaptcha/api/v1/auth/struct.register.html @@ -4,7 +4,7 @@
pub struct register;

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Struct mcaptcha::api::v1::auth::register

source · []
pub struct register;

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

diff --git a/mcaptcha/api/v1/auth/struct.signout.html b/mcaptcha/api/v1/auth/struct.signout.html index 79bdbce7..86d26dd3 100644 --- a/mcaptcha/api/v1/auth/struct.signout.html +++ b/mcaptcha/api/v1/auth/struct.signout.html @@ -4,7 +4,7 @@
pub struct signout;

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

Struct mcaptcha::api::v1::auth::signout

source · []
pub struct signout;

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

diff --git a/mcaptcha/constant.GIT_COMMIT_HASH.html b/mcaptcha/constant.GIT_COMMIT_HASH.html index 1232ae9f..f588df09 100644 --- a/mcaptcha/constant.GIT_COMMIT_HASH.html +++ b/mcaptcha/constant.GIT_COMMIT_HASH.html @@ -4,5 +4,5 @@
pub const GIT_COMMIT_HASH: &str = "3c3982bad571e0fb5f3dc806777d975cbded6247";
+

Constant mcaptcha::GIT_COMMIT_HASH

source · []
pub const GIT_COMMIT_HASH: &str = "9371416398e3efe8e193144c883c241e249125b7";
\ No newline at end of file diff --git a/src/mcaptcha/api/v1/auth.rs.html b/src/mcaptcha/api/v1/auth.rs.html index 93e5106d..5de2f736 100644 --- a/src/mcaptcha/api/v1/auth.rs.html +++ b/src/mcaptcha/api/v1/auth.rs.html @@ -204,6 +204,7 @@ 199 200 201 +202
/*
  * Copyright (C) 2022  Aravinth Manivannan <realaravinth@batsense.net>
  *
@@ -309,8 +310,9 @@
                 .get_password(&db_core::Login::Email(&payload.login))
                 .await?
         } else {
+            let username = data.creds.username(&payload.login)?;
             data.db
-                .get_password(&db_core::Login::Username(&payload.login))
+                .get_password(&db_core::Login::Username(&username))
                 .await?
         };