diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/AccountStore.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/AccountStore.kt index 3c568dd97..8abe898a4 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/AccountStore.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/AccountStore.kt @@ -1,6 +1,6 @@ package id.walt.ktorauthnz.accounts -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier import id.walt.ktorauthnz.methods.AuthenticationMethod import id.walt.ktorauthnz.methods.data.AuthMethodStoredData import id.walt.ktorauthnz.sessions.AuthSession diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/EditableAccountStore.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/EditableAccountStore.kt index 72b163a79..86434a00b 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/EditableAccountStore.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/EditableAccountStore.kt @@ -1,6 +1,6 @@ package id.walt.ktorauthnz.accounts -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier import id.walt.ktorauthnz.methods.AuthenticationMethod import id.walt.ktorauthnz.methods.data.AuthMethodStoredData diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/ExampleAccountStore.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/ExampleAccountStore.kt index 370d14052..6d34f65f5 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/ExampleAccountStore.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/ExampleAccountStore.kt @@ -1,7 +1,7 @@ package id.walt.ktorauthnz.accounts -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier -import id.walt.ktorauthnz.accounts.identifiers.UsernameIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.UsernameIdentifier import id.walt.ktorauthnz.methods.AuthenticationMethod import id.walt.ktorauthnz.methods.TOTP import id.walt.ktorauthnz.methods.UserPass diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/AccountIdentifierRegistry.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/AccountIdentifierRegistry.kt new file mode 100644 index 000000000..e724bfbf2 --- /dev/null +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/AccountIdentifierRegistry.kt @@ -0,0 +1,21 @@ +package id.walt.ktorauthnz.accounts.identifiers + +import id.walt.ktorauthnz.accounts.identifiers.methods.* + +object AccountIdentifierRegistry { + + private val defaultIdentifiers = + listOf(EmailIdentifier, JWTIdentifier, LDAPIdentifier, OIDCIdentifier, RADIUSIdentifier, UsernameIdentifier) + + private val factories: MutableMap> = + defaultIdentifiers.associateBy { it.identifierName }.toMutableMap() + + fun registerAccountIdentifier(identifierFactory: AccountIdentifier.AccountIdentifierFactory) = + factories.set(identifierFactory.identifierName, identifierFactory) + + fun getAccountIdentifier(type: String, accountIdentifierDataString: String): AccountIdentifier { + val factory = factories[type] ?: error("No such account identifier known") + + return factory.fromAccountIdentifierDataString(accountIdentifierDataString) + } +} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/EmailIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/EmailIdentifier.kt deleted file mode 100644 index 0f46187fd..000000000 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/EmailIdentifier.kt +++ /dev/null @@ -1,8 +0,0 @@ -package id.walt.ktorauthnz.accounts.identifiers - -@Suppress("EqualsOrHashCode") // equals provided by AccountIdentifier -class EmailIdentifier(val email: String) : AccountIdentifier("email") { - override fun getString() = email - - override fun hashCode(): Int = email.hashCode() -} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/JWTIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/JWTIdentifier.kt deleted file mode 100644 index e681225ca..000000000 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/JWTIdentifier.kt +++ /dev/null @@ -1,9 +0,0 @@ -package id.walt.ktorauthnz.accounts.identifiers - -@Suppress("EqualsOrHashCode") // equals provided by AccountIdentifier -class JWTIdentifier(val subject: String) : AccountIdentifier("jwt") { - override fun getString() = subject - - override fun hashCode(): Int = subject.hashCode() - -} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/LDAPIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/LDAPIdentifier.kt deleted file mode 100644 index a11fd4fac..000000000 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/LDAPIdentifier.kt +++ /dev/null @@ -1,9 +0,0 @@ -package id.walt.ktorauthnz.accounts.identifiers - -@Suppress("EqualsOrHashCode") // equals provided by AccountIdentifier -class LDAPIdentifier(val host: String, val name: String) : AccountIdentifier("ldap") { - override fun getString() = name - - override fun hashCode(): Int = 31 * host.hashCode() + name.hashCode() - -} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/OIDCIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/OIDCIdentifier.kt deleted file mode 100644 index 511e04bb7..000000000 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/OIDCIdentifier.kt +++ /dev/null @@ -1,9 +0,0 @@ -package id.walt.ktorauthnz.accounts.identifiers - -@Suppress("EqualsOrHashCode") // equals provided by AccountIdentifier -class OIDCIdentifier(val host: String, val name: String) : AccountIdentifier("oidc") { - override fun getString() = name - - override fun hashCode(): Int = 31 * host.hashCode() + name.hashCode() - -} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/RADIUSIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/RADIUSIdentifier.kt deleted file mode 100644 index 5613a0096..000000000 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/RADIUSIdentifier.kt +++ /dev/null @@ -1,9 +0,0 @@ -package id.walt.ktorauthnz.accounts.identifiers - -@Suppress("EqualsOrHashCode") // equals provided by AccountIdentifier -class RADIUSIdentifier(val host: String, val name: String) : AccountIdentifier("radius") { - override fun getString() = name - - override fun hashCode(): Int = 31 * host.hashCode() + name.hashCode() - -} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/UsernameIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/UsernameIdentifier.kt deleted file mode 100644 index 5f21c4dc9..000000000 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/UsernameIdentifier.kt +++ /dev/null @@ -1,6 +0,0 @@ -package id.walt.ktorauthnz.accounts.identifiers - -class UsernameIdentifier(val name: String) : AccountIdentifier("username") { - override fun getString() = name - override fun hashCode(): Int = name.hashCode() -} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/AccountIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/AccountIdentifier.kt similarity index 54% rename from waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/AccountIdentifier.kt rename to waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/AccountIdentifier.kt index cc32709f0..7548c1ada 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/AccountIdentifier.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/AccountIdentifier.kt @@ -1,14 +1,14 @@ -package id.walt.ktorauthnz.accounts.identifiers +package id.walt.ktorauthnz.accounts.identifiers.methods import id.walt.ktorauthnz.KtorAuthnzManager +import kotlinx.serialization.Serializable @Suppress("EqualsOrHashCode") +@Serializable abstract class AccountIdentifier(val identifierName: String) { - override fun toString(): String = "[$identifierName: ${getString()}]" - abstract fun getString(): String - - abstract override fun hashCode(): Int + override fun toString(): String = "[$identifierName: ${toDataString()}]" + abstract fun toDataString(): String override fun equals(other: Any?): Boolean { if (other !is AccountIdentifier) return false @@ -19,5 +19,9 @@ abstract class AccountIdentifier(val identifierName: String) { } fun resolveToAccountId() = KtorAuthnzManager.accountStore.lookupAccountUuid(this) + + abstract class AccountIdentifierFactory(val identifierName: String) { + abstract fun fromAccountIdentifierDataString(dataString: String): T + } } diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/EmailIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/EmailIdentifier.kt new file mode 100644 index 000000000..860f9477c --- /dev/null +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/EmailIdentifier.kt @@ -0,0 +1,12 @@ +package id.walt.ktorauthnz.accounts.identifiers.methods + +import kotlinx.serialization.Serializable + +@Serializable +data class EmailIdentifier(val email: String) : AccountIdentifier("email") { + override fun toDataString() = email + + companion object : AccountIdentifierFactory("email") { + override fun fromAccountIdentifierDataString(dataString: String): EmailIdentifier = EmailIdentifier(dataString) + } +} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/JWTIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/JWTIdentifier.kt new file mode 100644 index 000000000..e2bc0ff1b --- /dev/null +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/JWTIdentifier.kt @@ -0,0 +1,12 @@ +package id.walt.ktorauthnz.accounts.identifiers.methods + +import kotlinx.serialization.Serializable + +@Serializable +data class JWTIdentifier(val subject: String) : AccountIdentifier("jwt") { + override fun toDataString() = subject + + companion object : AccountIdentifierFactory("jwt") { + override fun fromAccountIdentifierDataString(dataString: String) = JWTIdentifier(dataString) + } +} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/LDAPIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/LDAPIdentifier.kt new file mode 100644 index 000000000..903d5cfb2 --- /dev/null +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/LDAPIdentifier.kt @@ -0,0 +1,14 @@ +package id.walt.ktorauthnz.accounts.identifiers.methods + +import kotlinx.serialization.Serializable +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json + +@Serializable +data class LDAPIdentifier(val host: String, val name: String) : AccountIdentifier("ldap") { + override fun toDataString() = Json.encodeToString(this) + + companion object : AccountIdentifierFactory("ldap") { + override fun fromAccountIdentifierDataString(dataString: String) = Json.decodeFromString(dataString) + } +} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/OIDCIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/OIDCIdentifier.kt new file mode 100644 index 000000000..0b0cb9fa7 --- /dev/null +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/OIDCIdentifier.kt @@ -0,0 +1,12 @@ +package id.walt.ktorauthnz.accounts.identifiers.methods + +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json + +data class OIDCIdentifier(val host: String, val name: String) : AccountIdentifier("oidc") { + override fun toDataString() = Json.encodeToString(this) + + companion object : AccountIdentifierFactory("oidc") { + override fun fromAccountIdentifierDataString(dataString: String) = Json.decodeFromString(dataString) + } +} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/RADIUSIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/RADIUSIdentifier.kt new file mode 100644 index 000000000..b91fa0497 --- /dev/null +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/RADIUSIdentifier.kt @@ -0,0 +1,14 @@ +package id.walt.ktorauthnz.accounts.identifiers.methods + +import kotlinx.serialization.Serializable +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json + +@Serializable +data class RADIUSIdentifier(val host: String, val name: String) : AccountIdentifier("radius") { + override fun toDataString() = Json.encodeToString(this) + + companion object : AccountIdentifierFactory("radius") { + override fun fromAccountIdentifierDataString(dataString: String) = Json.decodeFromString(dataString) + } +} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/UsernameIdentifier.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/UsernameIdentifier.kt new file mode 100644 index 000000000..7c0fc55dd --- /dev/null +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/accounts/identifiers/methods/UsernameIdentifier.kt @@ -0,0 +1,12 @@ +package id.walt.ktorauthnz.accounts.identifiers.methods + +import kotlinx.serialization.Serializable + +@Serializable +data class UsernameIdentifier(val name: String) : AccountIdentifier("username") { + override fun toDataString() = name + + companion object : AccountIdentifierFactory("username") { + override fun fromAccountIdentifierDataString(dataString: String) = UsernameIdentifier(dataString) + } +} diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/AuthenticationMethod.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/AuthenticationMethod.kt index 94cddf423..b0dc998e8 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/AuthenticationMethod.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/AuthenticationMethod.kt @@ -2,7 +2,7 @@ package id.walt.ktorauthnz.methods import id.walt.ktorauthnz.AuthContext import id.walt.ktorauthnz.KtorAuthnzManager -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier import id.walt.ktorauthnz.methods.data.AuthMethodStoredData import id.walt.ktorauthnz.sessions.AuthSession import id.walt.ktorauthnz.sessions.AuthSessionStatus diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/EmailPass.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/EmailPass.kt index b5c42a4d0..43f11a2b7 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/EmailPass.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/EmailPass.kt @@ -1,8 +1,8 @@ package id.walt.ktorauthnz.methods import id.walt.ktorauthnz.AuthContext -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier -import id.walt.ktorauthnz.accounts.identifiers.EmailIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.EmailIdentifier import id.walt.ktorauthnz.exceptions.authCheck import id.walt.ktorauthnz.methods.data.EmailPassStoredData import id.walt.ktorauthnz.sessions.AuthSession diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/JWT.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/JWT.kt index b2a837662..75a7d4676 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/JWT.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/JWT.kt @@ -3,7 +3,7 @@ package id.walt.ktorauthnz.methods import com.nimbusds.jose.JWSObject import com.nimbusds.jose.crypto.MACVerifier import id.walt.ktorauthnz.AuthContext -import id.walt.ktorauthnz.accounts.identifiers.JWTIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.JWTIdentifier import id.walt.ktorauthnz.exceptions.authCheck import id.walt.ktorauthnz.methods.config.JwtAuthConfiguration import id.walt.ktorauthnz.sessions.AuthSessionInformation diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/LDAP.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/LDAP.kt index e382b8511..2d03a5aaf 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/LDAP.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/LDAP.kt @@ -1,8 +1,8 @@ package id.walt.ktorauthnz.methods import id.walt.ktorauthnz.AuthContext -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier -import id.walt.ktorauthnz.accounts.identifiers.LDAPIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.LDAPIdentifier import id.walt.ktorauthnz.exceptions.authFailure import id.walt.ktorauthnz.methods.config.LDAPConfiguration import id.walt.ktorauthnz.sessions.AuthSession diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/OIDC.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/OIDC.kt index 6ea696dde..fb79ed012 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/OIDC.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/OIDC.kt @@ -1,7 +1,7 @@ package id.walt.ktorauthnz.methods import id.walt.ktorauthnz.AuthContext -import id.walt.ktorauthnz.accounts.identifiers.OIDCIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.OIDCIdentifier import id.walt.ktorauthnz.methods.config.OidcAuthConfiguration import io.github.smiley4.ktorswaggerui.dsl.routing.route import io.ktor.client.* diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/RADIUS.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/RADIUS.kt index b252dc50e..1318a3c91 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/RADIUS.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/RADIUS.kt @@ -1,8 +1,8 @@ package id.walt.ktorauthnz.methods import id.walt.ktorauthnz.AuthContext -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier -import id.walt.ktorauthnz.accounts.identifiers.RADIUSIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.RADIUSIdentifier import id.walt.ktorauthnz.exceptions.authCheck import id.walt.ktorauthnz.methods.config.RADIUSConfiguration import id.walt.ktorauthnz.sessions.AuthSession diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPass.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPass.kt index 14d24b882..b4727634d 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPass.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPass.kt @@ -1,8 +1,8 @@ package id.walt.ktorauthnz.methods import id.walt.ktorauthnz.AuthContext -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier -import id.walt.ktorauthnz.accounts.identifiers.UsernameIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.UsernameIdentifier import id.walt.ktorauthnz.exceptions.authCheck import id.walt.ktorauthnz.methods.data.UserPassStoredData import id.walt.ktorauthnz.sessions.AuthSession diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPassBasedAuthMethod.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPassBasedAuthMethod.kt index 6e6f444fb..ebd87f67d 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPassBasedAuthMethod.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/UserPassBasedAuthMethod.kt @@ -1,6 +1,6 @@ package id.walt.ktorauthnz.methods -import id.walt.ktorauthnz.accounts.identifiers.AccountIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.AccountIdentifier import id.walt.ktorauthnz.sessions.AuthSession import io.ktor.http.* import io.ktor.server.application.* diff --git a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/virtual/IdentifyEmail.kt b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/virtual/IdentifyEmail.kt index edf72ee34..cb3fb49f3 100644 --- a/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/virtual/IdentifyEmail.kt +++ b/waltid-libraries/auth/waltid-ktor-authnz/src/main/kotlin/id/walt/ktorauthnz/methods/virtual/IdentifyEmail.kt @@ -2,7 +2,7 @@ package id.walt.ktorauthnz.methods.virtual import id.walt.ktorauthnz.AuthContext import id.walt.ktorauthnz.KtorAuthnzManager -import id.walt.ktorauthnz.accounts.identifiers.EmailIdentifier +import id.walt.ktorauthnz.accounts.identifiers.methods.EmailIdentifier import id.walt.ktorauthnz.methods.data.FlowAmendmentData import id.walt.ktorauthnz.sessions.SessionManager import io.github.smiley4.ktorswaggerui.dsl.routing.post