[][src]Struct lightspeed_auth::service::auth_account::AuthAccountService

pub struct AuthAccountService<RepoManager: AuthRepositoryManager> { /* fields omitted */ }

Implementations

impl<RepoManager: AuthRepositoryManager> AuthAccountService<RepoManager>[src]

pub fn new(
    c3p0: RepoManager::C3P0,
    auth_config: AuthConfig,
    token_service: Arc<TokenService<RepoManager>>,
    password_service: Arc<PasswordCodecService>,
    auth_repo: RepoManager::AuthAccountRepo
) -> Self
[src]

pub async fn login<'_, '_, '_>(
    &'_ self,
    username: &'_ str,
    password: &'_ str
) -> Result<Auth, LightSpeedError>
[src]

pub async fn login_with_conn<'_, '_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    username: &'_ str,
    password: &'_ str
) -> Result<Auth, LightSpeedError>
[src]

pub async fn create_user<'_>(
    &'_ self,
    create_login_dto: CreateLoginDto
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn create_user_with_conn<'_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    create_login_dto: CreateLoginDto
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn generate_new_activation_token_by_username_and_email<'_, '_, '_>(
    &'_ self,
    username: &'_ str,
    email: &'_ str
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn generate_new_activation_token_by_username_and_email_with_conn<'_, '_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    username: &'_ str,
    email: &'_ str
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn generate_new_activation_token_by_token<'_, '_>(
    &'_ self,
    previous_activation_token: &'_ str
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn generate_new_activation_token_by_token_with_conn<'_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    previous_activation_token: &'_ str
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn activate_user<'_, '_>(
    &'_ self,
    activation_token: &'_ str
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn activate_user_with_conn<'_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    activation_token: &'_ str
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn generate_reset_password_token<'_, '_>(
    &'_ self,
    username: &'_ str
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn generate_reset_password_token_with_conn<'_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    username: &'_ str
) -> Result<(AuthAccountModel, TokenModel), LightSpeedError>
[src]

pub async fn reset_password_by_token<'_>(
    &'_ self,
    reset_password_dto: ResetPasswordDto
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn reset_password_by_token_with_conn<'_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    reset_password_dto: ResetPasswordDto
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn change_password<'_>(
    &'_ self,
    dto: ChangePasswordDto
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn change_password_with_conn<'_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    dto: ChangePasswordDto
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn fetch_by_user_id_with_conn<'_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    user_id: i64
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn fetch_by_username<'_, '_>(
    &'_ self,
    username: &'_ str
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn fetch_by_username_with_conn<'_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    username: &'_ str
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn add_roles<'_, '_>(
    &'_ self,
    user_id: i64,
    roles: &'_ [String]
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn add_roles_with_conn<'_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    user_id: i64,
    roles: &'_ [String]
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn delete_roles<'_, '_>(
    &'_ self,
    user_id: i64,
    roles: &'_ [String]
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn delete_roles_with_conn<'_, '_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    user_id: i64,
    roles: &'_ [String]
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn change_user_data<'_>(
    &'_ self,
    user_id: i64,
    new_username: Option<String>,
    new_email: Option<String>
) -> Result<AuthAccountModel, LightSpeedError>
[src]

pub async fn change_user_data_with_conn<'_, '_>(
    &'_ self,
    conn: &'_ mut RepoManager::Conn,
    user_id: i64,
    new_username: Option<String>,
    new_email: Option<String>
) -> Result<AuthAccountModel, LightSpeedError>
[src]

Trait Implementations

impl<RepoManager: Clone + AuthRepositoryManager> Clone for AuthAccountService<RepoManager> where
    RepoManager::C3P0: Clone,
    RepoManager::AuthAccountRepo: Clone
[src]

Auto Trait Implementations

impl<RepoManager> RefUnwindSafe for AuthAccountService<RepoManager> where
    <RepoManager as AuthRepositoryManager>::AuthAccountRepo: RefUnwindSafe,
    <RepoManager as AuthRepositoryManager>::C3P0: RefUnwindSafe,
    <RepoManager as AuthRepositoryManager>::TokenRepo: RefUnwindSafe

impl<RepoManager> Send for AuthAccountService<RepoManager> where
    <RepoManager as AuthRepositoryManager>::AuthAccountRepo: Send,
    <RepoManager as AuthRepositoryManager>::C3P0: Send,
    <RepoManager as AuthRepositoryManager>::TokenRepo: Send + Sync

impl<RepoManager> Sync for AuthAccountService<RepoManager> where
    <RepoManager as AuthRepositoryManager>::AuthAccountRepo: Sync,
    <RepoManager as AuthRepositoryManager>::C3P0: Sync,
    <RepoManager as AuthRepositoryManager>::TokenRepo: Send + Sync

impl<RepoManager> Unpin for AuthAccountService<RepoManager> where
    <RepoManager as AuthRepositoryManager>::AuthAccountRepo: Unpin,
    <RepoManager as AuthRepositoryManager>::C3P0: Unpin

impl<RepoManager> UnwindSafe for AuthAccountService<RepoManager> where
    <RepoManager as AuthRepositoryManager>::AuthAccountRepo: UnwindSafe,
    <RepoManager as AuthRepositoryManager>::C3P0: UnwindSafe,
    <RepoManager as AuthRepositoryManager>::TokenRepo: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,