Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
circles-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Circles
circles-android
Commits
fc22738e
Commit
fc22738e
authored
1 year ago
by
Taras
Browse files
Options
Downloads
Patches
Plain Diff
Remove auth module
parent
c40e13a6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
auth/src/main/java/org/futo/circles/auth/di/AuthModule.kt
+0
-60
0 additions, 60 deletions
auth/src/main/java/org/futo/circles/auth/di/AuthModule.kt
with
0 additions
and
60 deletions
auth/src/main/java/org/futo/circles/auth/di/AuthModule.kt
deleted
100644 → 0
+
0
−
60
View file @
c40e13a6
package
org.futo.circles.auth.di
import
androidx.lifecycle.SavedStateHandle
import
dagger.Module
import
dagger.Provides
import
dagger.hilt.InstallIn
import
dagger.hilt.android.components.ViewModelComponent
import
dagger.hilt.android.scopes.ViewModelScoped
import
org.futo.circles.auth.base.PasswordDataSource
import
org.futo.circles.auth.feature.log_in.stages.password.DirectLoginPasswordDataSource
import
org.futo.circles.auth.feature.log_in.stages.password.LoginBsSpekeDataSource
import
org.futo.circles.auth.feature.log_in.stages.password.LoginPasswordDataSource
import
org.futo.circles.auth.feature.sign_up.password.SignupBsSpekeDataSource
import
org.futo.circles.auth.feature.sign_up.password.SignupPasswordDataSource
import
org.futo.circles.auth.model.PasswordModeArg
import
org.futo.circles.core.extensions.getOrThrow
@Module
@InstallIn
(
ViewModelComponent
::
class
)
object
AuthModule
{
@Provides
@ViewModelScoped
fun
providePasswordDataSource
(
savedStateHandle
:
SavedStateHandle
,
loginStagesDataSourceFactory
:
BaseLoginStagesDataSource
.
Factory
,
loginBsSpekeStageDataSourceFactory
:
LoginBsSpekeDataSource
.
Factory
,
directLoginPasswordDataSource
:
DirectLoginPasswordDataSource
,
signupPasswordDataSource
:
SignupPasswordDataSource
,
signupBsSpekeDataSource
:
SignupBsSpekeDataSource
):
PasswordDataSource
=
when
(
savedStateHandle
.
getOrThrow
<
PasswordModeArg
>(
"mode"
))
{
PasswordModeArg
.
LoginPasswordStage
->
LoginPasswordDataSource
(
loginStagesDataSourceFactory
.
create
(
false
)
)
PasswordModeArg
.
ReAuthPassword
->
LoginPasswordDataSource
(
loginStagesDataSourceFactory
.
create
(
true
)
)
PasswordModeArg
.
LoginBsSpekeStage
->
loginBsSpekeStageDataSourceFactory
.
create
(
isReauth
=
false
,
isChangePasswordEnroll
=
false
)
PasswordModeArg
.
ReAuthBsSpekeLogin
->
loginBsSpekeStageDataSourceFactory
.
create
(
isReauth
=
true
,
isChangePasswordEnroll
=
false
)
PasswordModeArg
.
ReAuthBsSpekeSignup
->
loginBsSpekeStageDataSourceFactory
.
create
(
isReauth
=
true
,
isChangePasswordEnroll
=
true
)
PasswordModeArg
.
LoginDirect
->
directLoginPasswordDataSource
PasswordModeArg
.
SignupPasswordStage
->
signupPasswordDataSource
PasswordModeArg
.
SignupBsSpekeStage
->
signupBsSpekeDataSource
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment