Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multitenancy dashboard #1004

Merged
merged 29 commits into from
Jul 9, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f4cb54d
fix: tenant config
sattvikc Jun 27, 2024
d88e411
fix: api permissions and telemetry update
sattvikc Jun 27, 2024
4b599eb
fix: totp length validation
sattvikc Jun 27, 2024
e9999f5
fix: accept api key via authorization header
sattvikc Jun 27, 2024
690166f
fix: cache control header for jwks endpoint
sattvikc Jun 27, 2024
cad6a2b
fix: tests
sattvikc Jun 28, 2024
e456b70
fix: for dashboard
sattvikc Jul 1, 2024
4f7bab6
fix: remove unused import
sattvikc Jul 1, 2024
b8a6215
fix: remove unused import
sattvikc Jul 1, 2024
1b70227
fix: providers non null
sattvikc Jul 2, 2024
3d16e01
fix: tests
sattvikc Jul 2, 2024
a63979c
fix: pr comments
sattvikc Jul 3, 2024
d677a58
fix: pr comments
sattvikc Jul 5, 2024
dea8465
fix: pr comments
sattvikc Jul 5, 2024
48212a3
fix: pr comments
sattvikc Jul 5, 2024
a7241ec
fix: improve core config normalisation
sattvikc Jul 5, 2024
9de5e82
fix: more tests
sattvikc Jul 8, 2024
61ebbe2
fix: more tests
sattvikc Jul 8, 2024
7fca254
fix: clean up core config
sattvikc Jul 8, 2024
fadc4b9
Merge branch '9.1' into feat/mt-dashboard
rishabhpoddar Jul 8, 2024
3a7beba
fix: pr comments
sattvikc Jul 8, 2024
404edaf
fix: more test
sattvikc Jul 8, 2024
3e1e5a5
reformates code
rishabhpoddar Jul 8, 2024
36fa29e
Merge branch '9.1' into feat/mt-dashboard
rishabhpoddar Jul 8, 2024
b4cdd5a
reformats code
rishabhpoddar Jul 8, 2024
fab87be
fix: changelog and few other
sattvikc Jul 9, 2024
abe562e
fix: test
sattvikc Jul 9, 2024
bfeafd6
fix: supported versions
sattvikc Jul 9, 2024
c9a8f9b
fix: changelog
sattvikc Jul 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: tenant config
sattvikc committed Jun 27, 2024
commit f4cb54d6c89a3d2cb1462849938b45793cde7c78
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
import io.supertokens.multitenancy.Multitenancy;
import io.supertokens.pluginInterface.STORAGE_TYPE;
import io.supertokens.pluginInterface.multitenancy.*;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;
import io.supertokens.storageLayer.StorageLayer;
import io.supertokens.webserver.WebserverAPI;
import org.junit.*;
1 change: 0 additions & 1 deletion src/main/java/io/supertokens/config/Config.java
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import io.supertokens.Main;
1 change: 1 addition & 0 deletions src/main/java/io/supertokens/inmemorydb/Start.java
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@
import io.supertokens.pluginInterface.multitenancy.exceptions.DuplicateThirdPartyIdException;
import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException;
import io.supertokens.pluginInterface.multitenancy.sqlStorage.MultitenancySQLStorage;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;
import io.supertokens.pluginInterface.passwordless.PasswordlessCode;
import io.supertokens.pluginInterface.passwordless.PasswordlessDevice;
import io.supertokens.pluginInterface.passwordless.exception.*;
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@
import io.supertokens.pluginInterface.RowMapper;
import io.supertokens.pluginInterface.exceptions.StorageQueryException;
import io.supertokens.pluginInterface.multitenancy.*;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;

import java.sql.Connection;
import java.sql.ResultSet;
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@

package io.supertokens.multitenancy;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import io.supertokens.Main;
@@ -45,6 +44,7 @@
import io.supertokens.pluginInterface.multitenancy.exceptions.DuplicateThirdPartyIdException;
import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException;
import io.supertokens.pluginInterface.multitenancy.sqlStorage.MultitenancySQLStorage;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;
import io.supertokens.pluginInterface.passwordless.exception.DuplicatePhoneNumberException;
import io.supertokens.pluginInterface.thirdparty.exception.DuplicateThirdPartyUserException;
import io.supertokens.storageLayer.StorageLayer;
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@
import io.supertokens.pluginInterface.exceptions.StorageQueryException;
import io.supertokens.pluginInterface.multitenancy.*;
import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;
import io.supertokens.session.refreshToken.RefreshTokenKey;
import io.supertokens.signingkeys.AccessTokenSigningKey;
import io.supertokens.signingkeys.JWTSigningKey;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2024, VRAI Labs and/or its affiliates. All rights reserved.
*
* This software is licensed under the Apache License, Version 2.0 (the
* "License") as published by the Apache Software Foundation.
*
* You may not use this file except in compliance with the License. You may
* obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

package io.supertokens.multitenancy.tenantconfig;

public interface TenantConfig {
boolean isEmailPasswordEnabled();
boolean isPasswordlessEnabled();
boolean isThirdPartyEnabled();
boolean toJson();
}
1 change: 1 addition & 0 deletions src/main/java/io/supertokens/session/Session.java
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@
import io.supertokens.pluginInterface.exceptions.StorageTransactionLogicException;
import io.supertokens.pluginInterface.multitenancy.*;
import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;
import io.supertokens.pluginInterface.session.SessionStorage;
import io.supertokens.pluginInterface.session.noSqlStorage.SessionNoSQLStorage_1;
import io.supertokens.pluginInterface.session.sqlStorage.SessionSQLStorage;
Original file line number Diff line number Diff line change
@@ -33,6 +33,7 @@
import io.supertokens.pluginInterface.exceptions.StorageQueryException;
import io.supertokens.pluginInterface.multitenancy.*;
import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;
import io.supertokens.pluginInterface.useridmapping.UserIdMapping;
import io.supertokens.useridmapping.UserIdType;
import jakarta.servlet.ServletException;
1 change: 1 addition & 0 deletions src/main/java/io/supertokens/thirdparty/ThirdParty.java
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
import io.supertokens.pluginInterface.exceptions.StorageTransactionLogicException;
import io.supertokens.pluginInterface.multitenancy.*;
import io.supertokens.pluginInterface.multitenancy.exceptions.TenantOrAppNotFoundException;
import io.supertokens.pluginInterface.multitenancy.TenantConfig;
import io.supertokens.pluginInterface.thirdparty.exception.DuplicateThirdPartyUserException;
import io.supertokens.pluginInterface.thirdparty.exception.DuplicateUserIdException;
import io.supertokens.pluginInterface.thirdparty.sqlStorage.ThirdPartySQLStorage;
Loading