fixes in auth
This commit is contained in:
features
auth
client
src
commonMain
kotlin
dev
inmo
postssystem
features
auth
client
jsMain
kotlin
dev
inmo
postssystem
features
auth
client
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
auth
common
client
src
commonMain
kotlin
dev
inmo
postssystem
features
common
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
content
binary
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
content
binary
text
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
content
text
roles
server
src
jvmMain
kotlin
dev
inmo
postssystem
features
roles
gradle
publicators/simple/server/src/jvmMain/kotlin/dev/inmo/postssystem/publicators/simple/server
server/src/main/java/dev/inmo/postssystem/server
targets/telegram/loader/server/src/jvmMain/kotlin/dev/inmo/postssystem/targets/telegram/loader/server
@ -1,6 +1,6 @@
|
||||
package dev.inmo.postssystem.server
|
||||
|
||||
import dev.inmo.postssystem.features.common.server.sessions.ServerModuleLoader
|
||||
import dev.inmo.postssystem.features.common.server.ServerModuleLoader
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import java.io.File
|
||||
|
@ -3,10 +3,9 @@ package dev.inmo.postssystem.server
|
||||
import dev.inmo.postssystem.features.auth.server.AuthenticationRoutingConfigurator
|
||||
import dev.inmo.postssystem.features.auth.server.SessionAuthenticationConfigurator
|
||||
import dev.inmo.postssystem.features.auth.server.tokens.*
|
||||
import dev.inmo.postssystem.features.common.server.sessions.ApplicationAuthenticationConfigurator
|
||||
import dev.inmo.postssystem.features.common.server.ApplicationAuthenticationConfigurator
|
||||
import dev.inmo.postssystem.features.files.common.*
|
||||
import dev.inmo.postssystem.features.files.common.storage.*
|
||||
import dev.inmo.postssystem.features.files.common.storage.WriteFilesStorage
|
||||
import dev.inmo.postssystem.features.files.server.FilesRoutingConfigurator
|
||||
import dev.inmo.postssystem.features.roles.common.*
|
||||
import dev.inmo.postssystem.features.roles.common.keyvalue.KeyValuesRolesOriginalRepo
|
||||
@ -25,7 +24,7 @@ import dev.inmo.micro_utils.ktor.server.createKtorServer
|
||||
import dev.inmo.micro_utils.repos.exposed.keyvalue.ExposedKeyValueRepo
|
||||
import dev.inmo.micro_utils.repos.exposed.onetomany.ExposedOneToManyKeyValueRepo
|
||||
import dev.inmo.postssystem.features.common.common.*
|
||||
import dev.inmo.postssystem.features.common.server.sessions.Qualifiers
|
||||
import dev.inmo.postssystem.features.common.server.Qualifiers
|
||||
import dev.inmo.postssystem.features.content.common.*
|
||||
import dev.inmo.postssystem.features.content.server.ServerContentStorageAggregator
|
||||
import dev.inmo.postssystem.features.content.server.storage.*
|
||||
@ -49,6 +48,7 @@ import org.jetbrains.exposed.sql.Database
|
||||
import org.koin.core.module.Module
|
||||
import org.koin.core.parameter.ParametersHolder
|
||||
import org.koin.core.qualifier.StringQualifier
|
||||
import org.koin.core.qualifier.named
|
||||
import org.koin.dsl.*
|
||||
import java.io.File
|
||||
|
||||
@ -94,6 +94,7 @@ fun getDIModule(
|
||||
singleWithBinds { get<Config>().databaseConfig }
|
||||
singleWithBinds { get<Config>().authConfig }
|
||||
singleWithBinds(Qualifiers.filesFolderQualifier) { get<Config>().filesFolderFile }
|
||||
singleWithBinds(Qualifiers.commonFilesFolderQualifier) { File(get<Config>().filesFolderFile, "common").apply { mkdirs() } }
|
||||
|
||||
singleWithBinds { get<DatabaseConfig>().database }
|
||||
singleWithBinds { ExposedUsersStorage(get()) }
|
||||
@ -141,6 +142,17 @@ fun getDIModule(
|
||||
)
|
||||
}
|
||||
|
||||
singleWithBinds<FilesStorage> {
|
||||
val metasRepo = MetasKeyValueRepo(
|
||||
get(),
|
||||
ExposedKeyValueRepo(get(), { text("fileid") }, { text("metaInfo") }, "CommonFilesMetaInfoTable")
|
||||
)
|
||||
DefaultFilesStorage(
|
||||
DiskReadFilesStorage(get(Qualifiers.commonFilesFolderQualifier), metasRepo),
|
||||
WriteDistFilesStorage(get(Qualifiers.commonFilesFolderQualifier), metasRepo)
|
||||
)
|
||||
}
|
||||
|
||||
// Routing configurators
|
||||
singleWithBinds { FilesRoutingConfigurator(get(), null, get()) }
|
||||
singleWithBinds { StatusRoutingConfigurator }
|
||||
|
Reference in New Issue
Block a user