diff --git a/CHANGELOG.md b/CHANGELOG.md index f5c95d92..0aa28c7f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -- Introduce MFA Recipe plugin interface +## [3.0.0] - 2023-06-02 + +- Adds support for multi-tenancy ## [2.23.0] - 2023-04-05 @@ -111,4 +113,4 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - Added RowMapper interface for db queries - Email verification related changes -- User pagination related queries \ No newline at end of file +- User pagination related queries diff --git a/build.gradle b/build.gradle index 96d08997..179e4313 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java-library' } -version = "2.23.0" +version = "3.0.0" repositories { mavenCentral() diff --git a/jar/plugin-interface-2.22.0.jar b/jar/plugin-interface-2.22.0.jar deleted file mode 100644 index 2b9893e8..00000000 Binary files a/jar/plugin-interface-2.22.0.jar and /dev/null differ diff --git a/jar/plugin-interface-3.0.0.jar b/jar/plugin-interface-3.0.0.jar new file mode 100644 index 00000000..4e092b10 Binary files /dev/null and b/jar/plugin-interface-3.0.0.jar differ diff --git a/src/main/java/io/supertokens/pluginInterface/Storage.java b/src/main/java/io/supertokens/pluginInterface/Storage.java index 68c68f05..54154645 100644 --- a/src/main/java/io/supertokens/pluginInterface/Storage.java +++ b/src/main/java/io/supertokens/pluginInterface/Storage.java @@ -30,7 +30,7 @@ public interface Storage { // if silent is true, do not log anything out on the console - void constructor(String processId, boolean silent); + void constructor(String processId, boolean silent, boolean isTesting); void loadConfig(JsonObject jsonConfig, Set logLevels, TenantIdentifier tenantIdentifier) throws InvalidConfigException; @@ -90,4 +90,8 @@ boolean isUserIdBeingUsedInNonAuthRecipe(AppIdentifier appIdentifier, String cla Set getValidFieldsInConfig(); void setLogLevels(Set logLevels); + + String[] getAllTablesInTheDatabase() throws StorageQueryException; + + String[] getAllTablesInTheDatabaseThatHasDataForAppId(String appId) throws StorageQueryException; } diff --git a/src/main/java/io/supertokens/pluginInterface/multitenancy/AppIdentifierWithStorage.java b/src/main/java/io/supertokens/pluginInterface/multitenancy/AppIdentifierWithStorage.java index d96b5338..5ba6a161 100644 --- a/src/main/java/io/supertokens/pluginInterface/multitenancy/AppIdentifierWithStorage.java +++ b/src/main/java/io/supertokens/pluginInterface/multitenancy/AppIdentifierWithStorage.java @@ -23,11 +23,11 @@ import io.supertokens.pluginInterface.dashboard.sqlStorage.DashboardSQLStorage; import io.supertokens.pluginInterface.emailpassword.sqlStorage.EmailPasswordSQLStorage; import io.supertokens.pluginInterface.emailverification.sqlStorage.EmailVerificationSQLStorage; -import io.supertokens.pluginInterface.mfa.MfaStorage; import io.supertokens.pluginInterface.passwordless.sqlStorage.PasswordlessSQLStorage; import io.supertokens.pluginInterface.session.SessionStorage; import io.supertokens.pluginInterface.thirdparty.sqlStorage.ThirdPartySQLStorage; import io.supertokens.pluginInterface.totp.sqlStorage.TOTPSQLStorage; +import io.supertokens.pluginInterface.mfa.MfaStorage; import io.supertokens.pluginInterface.useridmapping.UserIdMappingStorage; import io.supertokens.pluginInterface.usermetadata.sqlStorage.UserMetadataSQLStorage; import io.supertokens.pluginInterface.userroles.sqlStorage.UserRolesSQLStorage; diff --git a/src/main/java/io/supertokens/pluginInterface/multitenancy/TenantIdentifierWithStorage.java b/src/main/java/io/supertokens/pluginInterface/multitenancy/TenantIdentifierWithStorage.java index 190a791e..0c58c084 100644 --- a/src/main/java/io/supertokens/pluginInterface/multitenancy/TenantIdentifierWithStorage.java +++ b/src/main/java/io/supertokens/pluginInterface/multitenancy/TenantIdentifierWithStorage.java @@ -21,11 +21,11 @@ import io.supertokens.pluginInterface.authRecipe.AuthRecipeStorage; import io.supertokens.pluginInterface.emailpassword.sqlStorage.EmailPasswordSQLStorage; import io.supertokens.pluginInterface.emailverification.sqlStorage.EmailVerificationSQLStorage; -import io.supertokens.pluginInterface.mfa.MfaStorage; import io.supertokens.pluginInterface.passwordless.sqlStorage.PasswordlessSQLStorage; import io.supertokens.pluginInterface.session.SessionStorage; import io.supertokens.pluginInterface.thirdparty.sqlStorage.ThirdPartySQLStorage; import io.supertokens.pluginInterface.totp.sqlStorage.TOTPSQLStorage; +import io.supertokens.pluginInterface.mfa.MfaStorage; import io.supertokens.pluginInterface.useridmapping.UserIdMappingStorage; import io.supertokens.pluginInterface.userroles.sqlStorage.UserRolesSQLStorage; @@ -123,7 +123,7 @@ public TOTPSQLStorage getTOTPStorage() { } return (TOTPSQLStorage) this.storage; } - + public MfaStorage getMfaStorage() { if (this.storage.getType() != STORAGE_TYPE.SQL) { // we only support SQL for now