Fix casdoor auth flow and cleanup the implementation
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
from fastapi import APIRouter, Header, Depends
|
||||
|
||||
from app.api.api_v1.endpoints import graphs, nodes, entities, login, scans, accounts
|
||||
from .endpoints import graphs, nodes, entities, login, scans, account, config
|
||||
|
||||
api_router = APIRouter()
|
||||
|
||||
api_router.include_router(config.router, tags=["Config"])
|
||||
api_router.include_router(login.router, tags=["Login"])
|
||||
api_router.include_router(accounts.router, tags=["Accounts"])
|
||||
api_router.include_router(account.router, tags=["Accounts"])
|
||||
api_router.include_router(graphs.router, tags=["Graphs"])
|
||||
api_router.include_router(entities.router, tags=["Entities"])
|
||||
api_router.include_router(nodes.router, tags=["Nodes"])
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
from typing import Annotated
|
||||
from typing import Annotated, Union
|
||||
|
||||
from casdoor import AsyncCasdoorSDK
|
||||
from fastapi import APIRouter, Request, Depends, HTTPException
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
|
||||
|
||||
from app import crud, schemas, models
|
||||
from app.api.utils import APIRequest
|
||||
from app import schemas
|
||||
from app.core.logger import get_logger
|
||||
from app.api import deps
|
||||
|
||||
@@ -15,23 +14,25 @@ router = APIRouter(prefix="/account")
|
||||
|
||||
@router.get(
|
||||
"/",
|
||||
response_model=schemas.CasdoorUser,
|
||||
response_model=Union[schemas.CasdoorUser, schemas.HTTPError],
|
||||
response_model_exclude_none=True
|
||||
)
|
||||
async def get_account(
|
||||
request: Request,
|
||||
request: APIRequest,
|
||||
user: Annotated[schemas.CasdoorUser, Depends(deps.get_user_from_session)]
|
||||
):
|
||||
try:
|
||||
sdk: AsyncCasdoorSdk = request.app.state.CASDOOR_SDK
|
||||
sdk = request.app.state.CASDOOR_SDK
|
||||
username = user.get("name")
|
||||
user_data = await sdk.get_user(username)
|
||||
return schemas.CasdoorUser(**user_data)
|
||||
user_data = sdk.get_user(username)
|
||||
return schemas.CasdoorUser(**user_data.get('data'))
|
||||
except Exception as e:
|
||||
log.error("Error inside accounts.get_account:")
|
||||
log.error(e)
|
||||
del request.session["member"]
|
||||
raise HTTPException(
|
||||
status_code=401,
|
||||
detail="Error grabbing user details. Please try authenticating again"
|
||||
detail="Error: get account"
|
||||
)
|
||||
|
||||
|
||||
51
backend/app/app/api/api_v1/endpoints/config.py
Normal file
51
backend/app/app/api/api_v1/endpoints/config.py
Normal file
@@ -0,0 +1,51 @@
|
||||
from typing import Annotated, Any
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from app import schemas
|
||||
from app.api.utils import APIRequest
|
||||
from app.core.logger import get_logger
|
||||
from app.api import deps
|
||||
|
||||
|
||||
log = get_logger("api_v1.endpoints.casdoor")
|
||||
router = APIRouter(prefix="/config")
|
||||
|
||||
|
||||
@router.get("/casdoor", response_model=Any)
|
||||
async def get_casdoor_config(
|
||||
request: APIRequest,
|
||||
user: Annotated[schemas.CasdoorUser, Depends(deps.get_user_from_session)]
|
||||
):
|
||||
sdk = request.app.state.CASDOOR_SDK
|
||||
casdoor_apps = sdk.get_applications()
|
||||
casdoor_certs = sdk.get_certs()
|
||||
casdoor_orgs = sdk.get_organizations()
|
||||
casdoor_users = sdk.get_users()
|
||||
casdoor_models = sdk.get_models()
|
||||
casdoor_permissions = sdk.get_permissions()
|
||||
casdoor_providers = sdk.get_providers()
|
||||
casdoor_products = sdk.get_products()
|
||||
casdoor_payments = sdk.get_payments()
|
||||
casdoor_roles = sdk.get_roles()
|
||||
casdoor_webhooks = sdk.get_webhooks()
|
||||
casdoor_syncers = sdk.get_syncers()
|
||||
# casdoor_resources = sdk.get_resources()
|
||||
# casdoor_tokens = sdk.get_tokens()
|
||||
|
||||
return {
|
||||
"applications": casdoor_apps.get('data', []),
|
||||
"organizations": casdoor_orgs.get('data', []),
|
||||
"users": casdoor_users.get('data', []),
|
||||
"certs": casdoor_certs.get('data', []),
|
||||
"models": casdoor_models.get('data', []),
|
||||
"permissions": casdoor_permissions.get('data', []),
|
||||
"providers": casdoor_providers.get('data', []),
|
||||
"products": casdoor_products.get('data', []),
|
||||
"payments": casdoor_payments.get('data', []),
|
||||
"roles": casdoor_roles.get('data', []),
|
||||
"syncers": casdoor_syncers.get('data', []),
|
||||
"webhooks": casdoor_webhooks.get('data', []),
|
||||
# "resources": casdoor_resources.get('data', []),
|
||||
# "tokens": casdoor_tokens.get('data', []),
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
|
||||
import os
|
||||
from casdoor import AsyncCasdoorSDK
|
||||
from casdoor import CasdoorSDK # AsyncCasdoorSDK
|
||||
from app.core.config import settings
|
||||
|
||||
print('settings.CASDOOR_CERT', settings.CASDOOR_CERT)
|
||||
class Config:
|
||||
CASDOOR_SDK = AsyncCasdoorSDK(
|
||||
CASDOOR_SDK = CasdoorSDK(
|
||||
endpoint=settings.CASDOOR_ENDPOINT,
|
||||
client_id=settings.REACT_APP_CASDOOR_CLIENT_ID,
|
||||
client_secret=settings.CASDOOR_CLIENT_SECRET,
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import json, ujson, datetime
|
||||
from uuid import UUID
|
||||
from sqlalchemy import Row
|
||||
|
||||
class SAEncoder(json.JSONEncoder):
|
||||
def default(self, obj):
|
||||
if isinstance(obj, Row):
|
||||
clean_sa_fields = lambda db_row: db_row if delattr(db_row, 'id') else db_row
|
||||
sa_obj = clean_sa_fields(next(iter(obj._mapping.values())))
|
||||
|
||||
fields = {}
|
||||
for field in [col for col in dir(sa_obj) if not col.startswith('_') and col != 'metadata' and col != 'registry' and col != 'id']:
|
||||
data = sa_obj.__getattribute__(field)
|
||||
try:
|
||||
ujson.dumps(data)
|
||||
fields[field] = data
|
||||
except TypeError as e:
|
||||
if isinstance(sa_obj, datetime.datetime):
|
||||
fields[field] = sa_obj.isoformat()
|
||||
elif isinstance(sa_obj, UUID):
|
||||
fields[field] = str(sa_obj)
|
||||
else:
|
||||
fields[field] = None
|
||||
return fields
|
||||
return json.JSONEncoder.default(self, sa_obj)
|
||||
@@ -72,10 +72,11 @@ app.add_middleware(
|
||||
secret_key=CasdoorConfig.SECRET_KEY,
|
||||
max_age=settings.ACCESS_TOKEN_EXPIRE_MINUTES
|
||||
)
|
||||
app.state.CASDOOR_SDK = CasdoorConfig().CASDOOR_SDK
|
||||
app.state.REDIRECT_URI = CasdoorConfig().REDIRECT_URI
|
||||
app.state.SECRET_TYPE = CasdoorConfig().SECRET_TYPE
|
||||
app.state.SECRET_KEY = CasdoorConfig().SECRET_KEY
|
||||
casdoor_config = CasdoorConfig()
|
||||
app.state.CASDOOR_SDK = casdoor_config.CASDOOR_SDK
|
||||
app.state.REDIRECT_URI = casdoor_config.REDIRECT_URI
|
||||
app.state.SECRET_TYPE = casdoor_config.SECRET_TYPE
|
||||
app.state.SECRET_KEY = casdoor_config.SECRET_KEY
|
||||
|
||||
|
||||
use_route_names_as_operation_ids(app)
|
||||
|
||||
@@ -4,9 +4,9 @@ class ErrorDetail:
|
||||
detail: str
|
||||
|
||||
class HTTPError(BaseModel):
|
||||
detail: str
|
||||
detail: str
|
||||
|
||||
class Config:
|
||||
json_schema_extra = {
|
||||
"example": {"detail": "HTTPException raised."},
|
||||
}
|
||||
class Config:
|
||||
json_schema_extra = {
|
||||
"example": {"detail": "HTTPException raised."},
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ openapi-schema-pydantic==1.2.4
|
||||
osintbuddy==0.0.4rc46.post1
|
||||
passlib==1.7.4
|
||||
pathspec==0.11.1
|
||||
pip==23.3
|
||||
pipdeptree==2.13.0
|
||||
psycopg2-binary==2.9.6
|
||||
pydantic-settings==2.0.3
|
||||
pyfiglet==0.8.post1
|
||||
@@ -41,6 +39,6 @@ uvicorn==0.22.0
|
||||
validators==0.20.0
|
||||
watchfiles==0.19.0
|
||||
boto3==1.28.64
|
||||
gremlinpy @ git+https://github.com/jerlendds/gremlinpy.git@7d3033e6a55ed9cb1f982ec3b58ca233e01c58e3
|
||||
gremlinpy @ git+https://github.com/jerlendds/gremlinpy.git@eaba7dca12ad0156eb0d6d8ba2eb5751551c6a6d
|
||||
boto3-stubs==1.28.64
|
||||
|
||||
|
||||
@@ -27,4 +27,4 @@ undetected-chromedriver==3.4.7
|
||||
validators==0.20.0
|
||||
watchfiles==0.19.0
|
||||
|
||||
gremlinpy @ git+https://github.com/jerlendds/gremlinpy.git@7d3033e6a55ed9cb1f982ec3b58ca233e01c58e3
|
||||
gremlinpy @ git+https://github.com/jerlendds/gremlinpy.git@eaba7dca12ad0156eb0d6d8ba2eb5751551c6a6d
|
||||
|
||||
12
frontend/openapi-config.ts
Normal file
12
frontend/openapi-config.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { ConfigFile } from '@rtk-query/codegen-openapi'
|
||||
|
||||
const config: ConfigFile = {
|
||||
schemaFile: 'http://localhost:48997/api/v1/openapi.json',
|
||||
apiFile: './src/app/baseApi.ts',
|
||||
apiImport: 'emptyApi',
|
||||
outputFile: './src/app/api.ts',
|
||||
exportName: 'api',
|
||||
hooks: true,
|
||||
}
|
||||
|
||||
export default config
|
||||
@@ -52,7 +52,8 @@
|
||||
"ui:dev": "craco start",
|
||||
"build": "craco build",
|
||||
"test": "craco test",
|
||||
"client:gen": "rm -f -dr ./src/app/openapi && mkdir ./src/app/openapi && openapi --name obSDK -i http://localhost:48997/api/v1/openapi.json --output ./src/app/openapi --exportModels true --exportSchemas true --indent 2 --postfixServices v1"
|
||||
"client:openapi:gen:deprecated": "rm -f -dr ./src/app/openapi && mkdir ./src/app/openapi && openapi --name obSDK -i http://localhost:48997/api/v1/openapi.json --output ./src/app/openapi --exportModels true --exportSchemas true --indent 2 --postfixServices v1",
|
||||
"client:gen": "npx @rtk-query/codegen-openapi openapi-config.ts"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
@@ -75,6 +76,7 @@
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||
"@craco/craco": "^7.1.0",
|
||||
"@rtk-query/codegen-openapi": "^1.1.3",
|
||||
"@swc/helpers": "^0.5.1",
|
||||
"@tailwindcss/typography": "^0.5.9",
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
|
||||
@@ -2,16 +2,10 @@ import { BrowserRouter } from 'react-router-dom';
|
||||
import AppRoutes from '@/routes/AppRoutes';
|
||||
import SDK from 'casdoor-js-sdk'
|
||||
import { SdkConfig } from 'casdoor-js-sdk/lib/esm/sdk'
|
||||
import { CASDOOR_CONFIG } from './app/baseApi';
|
||||
|
||||
const config = {
|
||||
serverUrl: process.env.REACT_APP_CASDOOR_ENDPOINT,
|
||||
clientId: process.env.REACT_APP_CASDOOR_CLIENT_ID,
|
||||
organizationName: process.env.REACT_APP_CASDOOR_ORG_NAME,
|
||||
appName: process.env.REACT_APP_CASDOOR_APP_NAME,
|
||||
redirectPath: "/callback",
|
||||
signinPath: "/api/v1/auth/sign-in",
|
||||
}
|
||||
window.sdk = new SDK(config as SdkConfig)
|
||||
if (process.env.NODE_ENV === 'development') console.info("ENVIRONMENT:\n", process.env)
|
||||
window.sdk = new SDK(CASDOOR_CONFIG)
|
||||
|
||||
function App() {
|
||||
return (
|
||||
|
||||
419
frontend/src/app/api.ts
Executable file → Normal file
419
frontend/src/app/api.ts
Executable file → Normal file
@@ -1,16 +1,405 @@
|
||||
import { obSDK } from './openapi';
|
||||
|
||||
const API_PREFIX = "/api/v1";
|
||||
const LS_USER_KEY = "ob-user";
|
||||
const DOMAIN = process.env.REACT_APP_BASE_URL?.replace('https://', '').replace('http://', '')
|
||||
const BASE_URL = process.env.REACT_APP_BASE_URL;
|
||||
const WS_URL = DOMAIN + API_PREFIX;
|
||||
|
||||
const sdk = new obSDK({
|
||||
BASE: BASE_URL,
|
||||
CREDENTIALS: "include",
|
||||
WITH_CREDENTIALS: true,
|
||||
import { emptyApi as api } from "./baseApi";
|
||||
const injectedRtkApi = api.injectEndpoints({
|
||||
endpoints: (build) => ({
|
||||
getCasdoorConfig: build.query<
|
||||
GetCasdoorConfigApiResponse,
|
||||
GetCasdoorConfigApiArg
|
||||
>({
|
||||
query: () => ({ url: `/api/v1/config/casdoor` }),
|
||||
}),
|
||||
postSignin: build.mutation<PostSigninApiResponse, PostSigninApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/auth/sign-in`,
|
||||
method: "POST",
|
||||
params: { code: queryArg.code },
|
||||
}),
|
||||
}),
|
||||
postSignout: build.mutation<PostSignoutApiResponse, PostSignoutApiArg>({
|
||||
query: () => ({ url: `/api/v1/auth/sign-out`, method: "POST" }),
|
||||
}),
|
||||
getAccount: build.query<GetAccountApiResponse, GetAccountApiArg>({
|
||||
query: () => ({ url: `/api/v1/account/` }),
|
||||
}),
|
||||
getGraph: build.query<GetGraphApiResponse, GetGraphApiArg>({
|
||||
query: (queryArg) => ({ url: `/api/v1/graphs/${queryArg.graphId}` }),
|
||||
}),
|
||||
updateFavoriteGraphUuid: build.mutation<
|
||||
UpdateFavoriteGraphUuidApiResponse,
|
||||
UpdateFavoriteGraphUuidApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/graphs/${queryArg.graphId}/favorite`,
|
||||
method: "PUT",
|
||||
params: { is_favorite: queryArg.isFavorite },
|
||||
}),
|
||||
}),
|
||||
getGraphs: build.query<GetGraphsApiResponse, GetGraphsApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/graphs`,
|
||||
params: {
|
||||
skip: queryArg.skip,
|
||||
limit: queryArg.limit,
|
||||
is_favorite: queryArg.isFavorite,
|
||||
},
|
||||
}),
|
||||
}),
|
||||
createGraph: build.mutation<CreateGraphApiResponse, CreateGraphApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/graphs`,
|
||||
method: "POST",
|
||||
body: queryArg.graphCreate,
|
||||
}),
|
||||
}),
|
||||
deleteGraph: build.mutation<DeleteGraphApiResponse, DeleteGraphApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/graphs`,
|
||||
method: "DELETE",
|
||||
params: { uuid: queryArg.uuid },
|
||||
}),
|
||||
}),
|
||||
getGraphStats: build.query<GetGraphStatsApiResponse, GetGraphStatsApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/graphs/${queryArg.graphId}/stats`,
|
||||
}),
|
||||
}),
|
||||
getEntity: build.query<GetEntityApiResponse, GetEntityApiArg>({
|
||||
query: (queryArg) => ({ url: `/api/v1/entities/${queryArg.entityUuid}` }),
|
||||
}),
|
||||
getEntities: build.query<GetEntitiesApiResponse, GetEntitiesApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/entities`,
|
||||
params: {
|
||||
skip: queryArg.skip,
|
||||
limit: queryArg.limit,
|
||||
is_favorite: queryArg.isFavorite,
|
||||
},
|
||||
}),
|
||||
}),
|
||||
createEntity: build.mutation<CreateEntityApiResponse, CreateEntityApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/entities`,
|
||||
method: "POST",
|
||||
body: queryArg.postEntityCreate,
|
||||
}),
|
||||
}),
|
||||
updateEntityByUuid: build.mutation<
|
||||
UpdateEntityByUuidApiResponse,
|
||||
UpdateEntityByUuidApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/entities/${queryArg.entityId}`,
|
||||
method: "PUT",
|
||||
body: queryArg.entityBase,
|
||||
}),
|
||||
}),
|
||||
deleteEntity: build.mutation<DeleteEntityApiResponse, DeleteEntityApiArg>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/entities/${queryArg.entityId}`,
|
||||
method: "DELETE",
|
||||
}),
|
||||
}),
|
||||
updateFavoriteEntityUuid: build.mutation<
|
||||
UpdateFavoriteEntityUuidApiResponse,
|
||||
UpdateFavoriteEntityUuidApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/entities/${queryArg.entityId}/favorite`,
|
||||
method: "PUT",
|
||||
params: { is_favorite: queryArg.isFavorite },
|
||||
}),
|
||||
}),
|
||||
refreshPlugins: build.query<
|
||||
RefreshPluginsApiResponse,
|
||||
RefreshPluginsApiArg
|
||||
>({
|
||||
query: () => ({ url: `/api/v1/nodes/refresh` }),
|
||||
}),
|
||||
getEntityTransforms: build.query<
|
||||
GetEntityTransformsApiResponse,
|
||||
GetEntityTransformsApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/nodes/transforms`,
|
||||
params: { label: queryArg.label },
|
||||
}),
|
||||
}),
|
||||
createGraphEntity: build.mutation<
|
||||
CreateGraphEntityApiResponse,
|
||||
CreateGraphEntityApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/nodes/`,
|
||||
method: "POST",
|
||||
body: queryArg.createNode,
|
||||
}),
|
||||
}),
|
||||
createScanMachine: build.mutation<
|
||||
CreateScanMachineApiResponse,
|
||||
CreateScanMachineApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/scans/machines`,
|
||||
method: "POST",
|
||||
body: queryArg.scanMachineCreate,
|
||||
}),
|
||||
}),
|
||||
getScanMachines: build.query<
|
||||
GetScanMachinesApiResponse,
|
||||
GetScanMachinesApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/scans/machines`,
|
||||
params: { skip: queryArg.skip, limit: queryArg.limit },
|
||||
}),
|
||||
}),
|
||||
deleteScanProject: build.mutation<
|
||||
DeleteScanProjectApiResponse,
|
||||
DeleteScanProjectApiArg
|
||||
>({
|
||||
query: (queryArg) => ({
|
||||
url: `/api/v1/scans`,
|
||||
method: "DELETE",
|
||||
params: { id: queryArg.id },
|
||||
}),
|
||||
}),
|
||||
getStatus: build.query<GetStatusApiResponse, GetStatusApiArg>({
|
||||
query: () => ({ url: `/status` }),
|
||||
}),
|
||||
}),
|
||||
overrideExisting: false,
|
||||
});
|
||||
|
||||
export { BASE_URL, LS_USER_KEY, WS_URL, API_PREFIX };
|
||||
export default sdk;
|
||||
export { injectedRtkApi as api };
|
||||
export type GetCasdoorConfigApiResponse =
|
||||
/** status 200 Successful Response */ Status;
|
||||
export type GetCasdoorConfigApiArg = void;
|
||||
export type PostSigninApiResponse = /** status 200 Successful Response */
|
||||
| Status
|
||||
| HttpError;
|
||||
export type PostSigninApiArg = {
|
||||
code: string;
|
||||
};
|
||||
export type PostSignoutApiResponse =
|
||||
/** status 200 Successful Response */ Status;
|
||||
export type PostSignoutApiArg = void;
|
||||
export type GetAccountApiResponse = /** status 200 Successful Response */
|
||||
| CasdoorUser
|
||||
| HttpError;
|
||||
export type GetAccountApiArg = void;
|
||||
export type GetGraphApiResponse = /** status 200 Successful Response */ Graph;
|
||||
export type GetGraphApiArg = {
|
||||
graphId: string;
|
||||
};
|
||||
export type UpdateFavoriteGraphUuidApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type UpdateFavoriteGraphUuidApiArg = {
|
||||
graphId: string;
|
||||
isFavorite?: boolean;
|
||||
};
|
||||
export type GetGraphsApiResponse =
|
||||
/** status 200 Successful Response */ GraphsList;
|
||||
export type GetGraphsApiArg = {
|
||||
skip?: number;
|
||||
limit?: number;
|
||||
isFavorite?: boolean;
|
||||
};
|
||||
export type CreateGraphApiResponse =
|
||||
/** status 200 Successful Response */ Graph;
|
||||
export type CreateGraphApiArg = {
|
||||
graphCreate: GraphCreate;
|
||||
};
|
||||
export type DeleteGraphApiResponse = /** status 200 Successful Response */ any;
|
||||
export type DeleteGraphApiArg = {
|
||||
uuid: string;
|
||||
};
|
||||
export type GetGraphStatsApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type GetGraphStatsApiArg = {
|
||||
graphId: string;
|
||||
};
|
||||
export type GetEntityApiResponse = /** status 200 Successful Response */ Entity;
|
||||
export type GetEntityApiArg = {
|
||||
entityUuid: string;
|
||||
};
|
||||
export type GetEntitiesApiResponse = /** status 200 Successful Response */ any;
|
||||
export type GetEntitiesApiArg = {
|
||||
skip?: number;
|
||||
limit?: number;
|
||||
isFavorite?: boolean;
|
||||
};
|
||||
export type CreateEntityApiResponse = /** status 200 Successful Response */ any;
|
||||
export type CreateEntityApiArg = {
|
||||
postEntityCreate: PostEntityCreate;
|
||||
};
|
||||
export type UpdateEntityByUuidApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type UpdateEntityByUuidApiArg = {
|
||||
entityId: string;
|
||||
entityBase: EntityBase;
|
||||
};
|
||||
export type DeleteEntityApiResponse = /** status 200 Successful Response */ any;
|
||||
export type DeleteEntityApiArg = {
|
||||
entityId: string;
|
||||
};
|
||||
export type UpdateFavoriteEntityUuidApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type UpdateFavoriteEntityUuidApiArg = {
|
||||
entityId: string;
|
||||
isFavorite?: boolean;
|
||||
};
|
||||
export type RefreshPluginsApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type RefreshPluginsApiArg = void;
|
||||
export type GetEntityTransformsApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type GetEntityTransformsApiArg = {
|
||||
label: string;
|
||||
};
|
||||
export type CreateGraphEntityApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type CreateGraphEntityApiArg = {
|
||||
createNode: CreateNode;
|
||||
};
|
||||
export type CreateScanMachineApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type CreateScanMachineApiArg = {
|
||||
scanMachineCreate: ScanMachineCreate;
|
||||
};
|
||||
export type GetScanMachinesApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type GetScanMachinesApiArg = {
|
||||
skip?: number;
|
||||
limit?: number;
|
||||
};
|
||||
export type DeleteScanProjectApiResponse =
|
||||
/** status 200 Successful Response */ any;
|
||||
export type DeleteScanProjectApiArg = {
|
||||
id: number;
|
||||
};
|
||||
export type GetStatusApiResponse = /** status 200 Successful Response */ any;
|
||||
export type GetStatusApiArg = void;
|
||||
export type Status = {
|
||||
status: string;
|
||||
};
|
||||
export type HttpError = {
|
||||
detail: string;
|
||||
};
|
||||
export type ValidationError = {
|
||||
loc: (string | number)[];
|
||||
msg: string;
|
||||
type: string;
|
||||
};
|
||||
export type HttpValidationError = {
|
||||
detail?: ValidationError[];
|
||||
};
|
||||
export type CasdoorUser = {
|
||||
owner?: string;
|
||||
type?: string;
|
||||
signupApplication?: string;
|
||||
id: string;
|
||||
sub?: string | null;
|
||||
exp?: number | null;
|
||||
nbf?: number | null;
|
||||
iat?: number | null;
|
||||
jti?: string | null;
|
||||
aud?: string[];
|
||||
avatar: string | null;
|
||||
avatarType: string | null;
|
||||
permanentAvatar: string | null;
|
||||
firstName?: string | null;
|
||||
lastName?: string | null;
|
||||
name: string;
|
||||
displayName: string;
|
||||
email: string;
|
||||
emailVerified: boolean;
|
||||
phone: string | null;
|
||||
countryCode: string | null;
|
||||
region: string | null;
|
||||
location: string | null;
|
||||
bio: string | null;
|
||||
language?: string | null;
|
||||
isOnline?: boolean | null;
|
||||
isAdmin?: boolean | null;
|
||||
isForbidden?: boolean | null;
|
||||
isDeleted?: boolean | null;
|
||||
updatedTime: string;
|
||||
createdTime: string;
|
||||
};
|
||||
export type Graph = {
|
||||
name: string;
|
||||
description: string | null;
|
||||
is_favorite?: boolean;
|
||||
uuid: string;
|
||||
updated: string;
|
||||
created: string;
|
||||
last_seen: string;
|
||||
};
|
||||
export type GraphsList = {
|
||||
graphs: Graph[];
|
||||
count: number;
|
||||
};
|
||||
export type GraphCreate = {
|
||||
name: string;
|
||||
description: string | null;
|
||||
is_favorite?: boolean;
|
||||
};
|
||||
export type Entity = {
|
||||
label?: string | null;
|
||||
author?: string | null;
|
||||
description?: string | null;
|
||||
source?: string | null;
|
||||
is_favorite?: boolean | null;
|
||||
uuid?: string | null;
|
||||
last_edited: string | null;
|
||||
updated: string | null;
|
||||
created: string | null;
|
||||
};
|
||||
export type PostEntityCreate = {
|
||||
label: string;
|
||||
author: string;
|
||||
description: string;
|
||||
};
|
||||
export type EntityBase = {
|
||||
label?: string | null;
|
||||
author?: string | null;
|
||||
description?: string | null;
|
||||
source?: string | null;
|
||||
is_favorite?: boolean | null;
|
||||
};
|
||||
export type XyPosition = {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
export type CreateNode = {
|
||||
label: string;
|
||||
position: XyPosition;
|
||||
graphId: string;
|
||||
};
|
||||
export type ScanMachineCreate = {
|
||||
name: string;
|
||||
description: string;
|
||||
};
|
||||
export const {
|
||||
useGetCasdoorConfigQuery,
|
||||
usePostSigninMutation,
|
||||
usePostSignoutMutation,
|
||||
useGetAccountQuery,
|
||||
useGetGraphQuery,
|
||||
useUpdateFavoriteGraphUuidMutation,
|
||||
useGetGraphsQuery,
|
||||
useCreateGraphMutation,
|
||||
useDeleteGraphMutation,
|
||||
useGetGraphStatsQuery,
|
||||
useGetEntityQuery,
|
||||
useGetEntitiesQuery,
|
||||
useCreateEntityMutation,
|
||||
useUpdateEntityByUuidMutation,
|
||||
useDeleteEntityMutation,
|
||||
useUpdateFavoriteEntityUuidMutation,
|
||||
useRefreshPluginsQuery,
|
||||
useGetEntityTransformsQuery,
|
||||
useCreateGraphEntityMutation,
|
||||
useCreateScanMachineMutation,
|
||||
useGetScanMachinesQuery,
|
||||
useDeleteScanProjectMutation,
|
||||
useGetStatusQuery,
|
||||
} = injectedRtkApi;
|
||||
|
||||
34
frontend/src/app/baseApi.ts
Executable file
34
frontend/src/app/baseApi.ts
Executable file
@@ -0,0 +1,34 @@
|
||||
import { createApi, fetchBaseQuery, Api } from '@reduxjs/toolkit/query/react'
|
||||
import { SdkConfig } from 'casdoor-js-sdk/lib/cjs/sdk';
|
||||
|
||||
const API_PREFIX = "/api/v1";
|
||||
const LS_USER_KEY = "ob-user";
|
||||
const lUserDefault = (isAuthenticated: boolean) => ({ isAuthenticated})
|
||||
|
||||
const DOMAIN = process.env.REACT_APP_BASE_URL?.replace('https://', '').replace('http://', '')
|
||||
const BASE_URL = process.env.REACT_APP_BASE_URL;
|
||||
const WS_URL = DOMAIN + API_PREFIX;
|
||||
|
||||
const emptyApi = createApi({
|
||||
reducerPath: 'ob',
|
||||
baseQuery: fetchBaseQuery({
|
||||
baseUrl: BASE_URL,
|
||||
credentials: 'include',
|
||||
}),
|
||||
endpoints: () => ({}),
|
||||
})
|
||||
|
||||
const CASDOOR_CONFIG: SdkConfig = {
|
||||
serverUrl: process.env.REACT_APP_CASDOOR_ENDPOINT ?? 'http://localhost:45910',
|
||||
clientId: process.env.REACT_APP_CASDOOR_CLIENT_ID ?? '1d69456af504f585b7bf',
|
||||
organizationName: process.env.REACT_APP_CASDOOR_ORG_NAME ?? 'org_osintbuddy',
|
||||
appName: process.env.REACT_APP_CASDOOR_APP_NAME ?? 'app_osintbuddy',
|
||||
redirectPath: "/callback",
|
||||
signinPath: "/api/v1/auth/sign-in",
|
||||
}
|
||||
|
||||
// localStorage utilities
|
||||
export { LS_USER_KEY, lUserDefault };
|
||||
|
||||
// api utilities
|
||||
export { BASE_URL, WS_URL, API_PREFIX, CASDOOR_CONFIG, emptyApi };
|
||||
@@ -1,6 +1,69 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
|
||||
import type { RootState, AppDispatch } from './store';
|
||||
|
||||
|
||||
export const useEffectOnce = (effect: () => void | (() => void)) => {
|
||||
const destroyFunc = useRef<void | (() => void)>();
|
||||
const effectCalled = useRef(false);
|
||||
const renderAfterCalled = useRef(false);
|
||||
const [val, setVal] = useState<number>(0);
|
||||
|
||||
if (effectCalled.current) {
|
||||
renderAfterCalled.current = true;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
// only execute the effect first time around
|
||||
if (!effectCalled.current) {
|
||||
destroyFunc.current = effect();
|
||||
effectCalled.current = true;
|
||||
}
|
||||
|
||||
// this forces one render after the effect is run
|
||||
setVal((val) => val + 1);
|
||||
|
||||
return () => {
|
||||
// if the comp didn't render since the useEffect was called,
|
||||
// we know it's the dummy React cycle
|
||||
if (!renderAfterCalled.current) {
|
||||
return;
|
||||
}
|
||||
if (destroyFunc.current) {
|
||||
destroyFunc.current();
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export function useComponentVisible(initialIsVisible: boolean) {
|
||||
const [isOpen, setIsOpen] = useState(initialIsVisible);
|
||||
const ref = useRef(null);
|
||||
|
||||
const handleClickOutside = (event: any) => {
|
||||
// @ts-ignore
|
||||
if (ref.current && !ref.current.contains(event.target)) {
|
||||
setIsOpen(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
document.addEventListener('click', handleClickOutside, true);
|
||||
return () => {
|
||||
document.removeEventListener('click', handleClickOutside, true);
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
return { ref, isOpen, setIsOpen };
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Use throughout your app instead of plain `useDispatch` and `useSelector`
|
||||
export const useAppDispatch = () => useDispatch<AppDispatch>();
|
||||
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
import { configureStore, ThunkAction, Action, combineReducers } from '@reduxjs/toolkit';
|
||||
import account from '@/features/account/accountSlice';
|
||||
import { configureStore, ThunkAction, Action, combineReducers, Middleware} from '@reduxjs/toolkit';
|
||||
import account, { signOut } from '@/features/account/accountSlice';
|
||||
import graph from '@/features/graph/graphSlice';
|
||||
import dashboard from '@/features/dashboard/dashboardSlice';
|
||||
import { setupListeners } from '@reduxjs/toolkit/query';
|
||||
import { api } from './api';
|
||||
import { authMiddleware, rtkQueryErrorLogger } from './middleware';
|
||||
|
||||
const reducer = combineReducers({
|
||||
dashboard,
|
||||
[api.reducerPath]: api.reducer,
|
||||
account,
|
||||
graph,
|
||||
});
|
||||
|
||||
export const store = configureStore({
|
||||
reducer,
|
||||
middleware: (getDefaultMiddleware) => getDefaultMiddleware(),
|
||||
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(api.middleware).concat(rtkQueryErrorLogger)
|
||||
});
|
||||
|
||||
setupListeners(store.dispatch)
|
||||
|
||||
export type RootState = ReturnType<typeof reducer>;
|
||||
export type AppDispatch = typeof store.dispatch;
|
||||
export type RootState = ReturnType<typeof store.getState>;
|
||||
export type AppThunk<ReturnType = void> = ThunkAction<ReturnType, RootState, unknown, Action<string>>;
|
||||
|
||||
|
||||
47
frontend/src/app/utilities.ts
Normal file
47
frontend/src/app/utilities.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
export function formatTime(date: Date) {
|
||||
var hours = date.getHours();
|
||||
var minutes: string | number = date.getMinutes();
|
||||
var ampm = hours >= 12 ? 'pm' : 'am';
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||
minutes = minutes < 10 ? '0' + minutes : minutes;
|
||||
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||
return strTime;
|
||||
}
|
||||
|
||||
export function formatPGDate(date: string, showAt: boolean = false): string {
|
||||
if (date) {
|
||||
const dateStr = date.replace(' ', 'T')
|
||||
return `${new Date(dateStr).toLocaleDateString()}${showAt ? ' at ' : ' '}${formatTime(new Date(dateStr))}`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
export function capitalize(value: string) {
|
||||
return value.charAt(0).toUpperCase() + value.slice(1);
|
||||
}
|
||||
|
||||
export const isString = (value: any): boolean => typeof value === 'string';
|
||||
|
||||
export function lStorage(
|
||||
key: string,
|
||||
value?: JSONObject | string
|
||||
) {
|
||||
if (value) {
|
||||
// console.debug('useLocalStorage: ', key, value)
|
||||
if (isString(value)) {
|
||||
localStorage.setItem(key, value as string)
|
||||
} else {
|
||||
localStorage.setItem(key, JSON.stringify(value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
const rawData = localStorage.getItem(key)
|
||||
try {
|
||||
if (rawData) return JSON.parse(rawData)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
return rawData
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
import { format } from 'path';
|
||||
import { RefObject, useEffect, useRef, useState } from 'react';
|
||||
|
||||
export const useEffectOnce = (effect: () => void | (() => void)) => {
|
||||
const destroyFunc = useRef<void | (() => void)>();
|
||||
const effectCalled = useRef(false);
|
||||
const renderAfterCalled = useRef(false);
|
||||
const [val, setVal] = useState<number>(0);
|
||||
|
||||
if (effectCalled.current) {
|
||||
renderAfterCalled.current = true;
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
// only execute the effect first time around
|
||||
if (!effectCalled.current) {
|
||||
destroyFunc.current = effect();
|
||||
effectCalled.current = true;
|
||||
}
|
||||
|
||||
// this forces one render after the effect is run
|
||||
setVal((val) => val + 1);
|
||||
|
||||
return () => {
|
||||
// if the comp didn't render since the useEffect was called,
|
||||
// we know it's the dummy React cycle
|
||||
if (!renderAfterCalled.current) {
|
||||
return;
|
||||
}
|
||||
if (destroyFunc.current) {
|
||||
destroyFunc.current();
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
};
|
||||
|
||||
|
||||
export function capitalize(value: string) {
|
||||
return value.charAt(0).toUpperCase() + value.slice(1);
|
||||
}
|
||||
|
||||
|
||||
export function useComponentVisible(initialIsVisible: boolean) {
|
||||
const [isOpen, setIsOpen] = useState(initialIsVisible);
|
||||
const ref = useRef(null);
|
||||
|
||||
const handleClickOutside = (event: any) => {
|
||||
// @ts-ignore
|
||||
if (ref.current && !ref.current.contains(event.target)) {
|
||||
setIsOpen(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
document.addEventListener('click', handleClickOutside, true);
|
||||
return () => {
|
||||
document.removeEventListener('click', handleClickOutside, true);
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
||||
return { ref, isOpen, setIsOpen };
|
||||
}
|
||||
|
||||
|
||||
export function formatAMPM(date: Date) {
|
||||
var hours = date.getHours();
|
||||
var minutes: string | number = date.getMinutes();
|
||||
var ampm = hours >= 12 ? 'pm' : 'am';
|
||||
hours = hours % 12;
|
||||
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||
minutes = minutes < 10 ? '0' + minutes : minutes;
|
||||
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||
return strTime;
|
||||
}
|
||||
|
||||
|
||||
export function formatPGDate(date: string, showAt: boolean = false): string {
|
||||
if (date) {
|
||||
const dateStr = date.replace(' ', 'T')
|
||||
return `${new Date(dateStr).toLocaleDateString()}
|
||||
${showAt ? 'at' : ''}
|
||||
${formatAMPM(new Date(dateStr))}`
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
|
||||
export const isString = (value: any): boolean => typeof value === 'string';
|
||||
|
||||
|
||||
export function useLocalStorage(
|
||||
key: string,
|
||||
value?: JSONObject | string
|
||||
) {
|
||||
if (value) {
|
||||
if (isString(value)) {
|
||||
localStorage.setItem(key, value as string)
|
||||
} else {
|
||||
localStorage.setItem(key, JSON.stringify(value))
|
||||
}
|
||||
return value
|
||||
}
|
||||
const rawData = localStorage.getItem(key)
|
||||
try {
|
||||
if (rawData) return JSON.parse(rawData)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
return rawData
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
import { createSlice, PayloadAction, createAsyncThunk } from '@reduxjs/toolkit';
|
||||
|
||||
import { RootState } from '@/app/store';
|
||||
import sdk from '@/app/api';
|
||||
import { Entitiesv1, Graph, GraphCreate } from '@/app/openapi';
|
||||
import Entities from '../../routes/dashboard/Entities';
|
||||
|
||||
export interface Graphs {
|
||||
graphs: Graph[];
|
||||
favoriteGraphs: Graph[];
|
||||
isLoadingGraphs: boolean;
|
||||
isGraphsError: boolean;
|
||||
isLoadingFavoriteGraphs: boolean;
|
||||
isFavoriteGraphsError: boolean;
|
||||
isLoadingEntities: boolean;
|
||||
isLoadingFavoriteEntities: boolean;
|
||||
isEntitiesError: boolean;
|
||||
isFavoriteEntitesError: boolean;
|
||||
favoriteEntities: JSONObject[];
|
||||
entities: JSONObject[];
|
||||
activeGraph: null | Graph;
|
||||
selectedEntity: null | JSONObject;
|
||||
activeTab: "graphs" | "entities" | "market";
|
||||
graphsCount: number;
|
||||
favoriteGraphsCount: number
|
||||
favoriteEntitiesCount: number;
|
||||
entitiesCount: number;
|
||||
activeEntityId: JSONObject | null;
|
||||
}
|
||||
|
||||
const initialState: Graphs = {
|
||||
isLoadingGraphs: false,
|
||||
isGraphsError: false,
|
||||
favoriteGraphs: [],
|
||||
graphs: [],
|
||||
graphsCount: 0,
|
||||
favoriteGraphsCount: 0,
|
||||
activeGraph: null,
|
||||
favoriteEntitiesCount: 0,
|
||||
entitiesCount: 0,
|
||||
selectedEntity: null,
|
||||
entities: [],
|
||||
favoriteEntities: [],
|
||||
isLoadingFavoriteGraphs: false,
|
||||
isFavoriteGraphsError: false,
|
||||
isLoadingEntities: false,
|
||||
isLoadingFavoriteEntities: false,
|
||||
isEntitiesError: false,
|
||||
isFavoriteEntitesError: false,
|
||||
activeTab: "graphs",
|
||||
activeEntityId: null
|
||||
};
|
||||
|
||||
|
||||
interface UpdateGraphFavorite {
|
||||
uuid: string
|
||||
isFavorite: boolean
|
||||
}
|
||||
|
||||
interface DataFavorite {
|
||||
data: Graph
|
||||
isFavorite: boolean
|
||||
}
|
||||
|
||||
interface ErrorFavorite {
|
||||
data: Graph;
|
||||
isFavorite: boolean;
|
||||
}
|
||||
|
||||
// TODO: Fix these stupid fucking types in the builder...
|
||||
export const updateGraphFavorite = createAsyncThunk("graphs/updateGraphFavorite", async ({ uuid, isFavorite }: UpdateGraphFavorite, thunkAPI): Promise<DataFavorite | ErrorFavorite> => await sdk.graphs.updateFavoriteGraphUuid(uuid, isFavorite)
|
||||
.then((data: Graph) => ({ data, isFavorite }))
|
||||
.catch((error) => ({ data: error, isFavorite }))
|
||||
);
|
||||
|
||||
|
||||
export const createGraph = createAsyncThunk("graphs/createGraph", async (createGraph: GraphCreate, thunkAPI) => await sdk.graphs.createGraph(createGraph)
|
||||
.then(graph => graph)
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
return thunkAPI.rejectWithValue(error)
|
||||
})
|
||||
);
|
||||
|
||||
export const deleteGraph = createAsyncThunk("graphs/deleteGraph", async (uuid: string, thunkAPI) => await sdk.graphs.deleteGraph(uuid)
|
||||
.then(() => uuid)
|
||||
.catch((error: Error) => {
|
||||
console.error(error);
|
||||
return thunkAPI.rejectWithValue(error);
|
||||
})
|
||||
);
|
||||
|
||||
interface GetGraphs {
|
||||
pageSize: number, pageIndex: number, isFavorite: boolean
|
||||
}
|
||||
|
||||
export const getGraphs = createAsyncThunk("graphs/getGraphs", async ({
|
||||
pageSize,
|
||||
pageIndex,
|
||||
isFavorite }: GetGraphs,
|
||||
thunkAPI
|
||||
) => await sdk.graphs.getGraphs(pageSize * pageIndex, pageSize, isFavorite)
|
||||
.then((data) => {
|
||||
return { data, isFavorite }
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
return thunkAPI.rejectWithValue({ error, isFavorite });
|
||||
}))
|
||||
|
||||
|
||||
export const getEntities = createAsyncThunk("entities/getEntities", async ({
|
||||
pageSize,
|
||||
pageIndex,
|
||||
isFavorite }: GetGraphs,
|
||||
thunkAPI
|
||||
) => await sdk.entities.getEntities(pageSize * pageIndex, pageSize, isFavorite)
|
||||
.then((data) => {
|
||||
return { data, isFavorite }
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
return thunkAPI.rejectWithValue({ error, isFavorite });
|
||||
}))
|
||||
|
||||
|
||||
export const dashboard = createSlice({
|
||||
name: "dashboard",
|
||||
initialState,
|
||||
reducers: {
|
||||
setActiveTab: (state, action) => {
|
||||
state.activeTab = action.payload;
|
||||
},
|
||||
setActiveEntityId: (state, action) => {
|
||||
state.activeEntityId = action.payload
|
||||
}
|
||||
},
|
||||
extraReducers: (builder) => {
|
||||
builder
|
||||
.addCase(createGraph.fulfilled, (state, action) => {
|
||||
state.graphs.push(action.payload)
|
||||
})
|
||||
.addCase(deleteGraph.fulfilled, (state, action) => {
|
||||
state.graphs = state.graphs.filter((graph) => graph.uuid !== action.payload)
|
||||
state.favoriteGraphs = state.favoriteGraphs.filter((graph) => graph.uuid !== action.payload)
|
||||
})
|
||||
.addCase(getGraphs.fulfilled, (state, action) => {
|
||||
if (action.payload.isFavorite) {
|
||||
state.favoriteGraphs = action.payload.data?.graphs
|
||||
state.favoriteGraphsCount = action.payload?.data.count
|
||||
} else {
|
||||
state.graphs = action.payload.data.graphs
|
||||
state.graphsCount = action.payload.data.count
|
||||
}
|
||||
})
|
||||
.addCase(updateGraphFavorite.fulfilled, (state, action) => {
|
||||
if (action.payload.isFavorite) {
|
||||
state.graphs = state.graphs.filter((graph) => graph.uuid !== action.payload.data.uuid)
|
||||
state.favoriteGraphsCount += 1
|
||||
state.graphsCount -= 1
|
||||
state.favoriteGraphs.push(action.payload.data)
|
||||
} else {
|
||||
state.favoriteGraphs = state.favoriteGraphs.filter((graph) => graph.uuid !== action.payload.data.uuid)
|
||||
state.graphsCount += 1
|
||||
state.favoriteGraphsCount -= 1
|
||||
state.graphs.push(action.payload.data)
|
||||
}
|
||||
state.isLoadingFavoriteGraphs = false
|
||||
state.isLoadingGraphs = false
|
||||
})
|
||||
.addCase(updateGraphFavorite.pending, (state, action) => {
|
||||
state.isLoadingFavoriteGraphs = true
|
||||
state.isLoadingGraphs = true
|
||||
})
|
||||
|
||||
.addCase(updateGraphFavorite.rejected, (state, action: JSONObject) => {
|
||||
if (action.payload.isFavorite) {
|
||||
state.isFavoriteGraphsError = true
|
||||
state.isLoadingFavoriteGraphs = false
|
||||
}
|
||||
if (!action.payload.isFavorite) {
|
||||
state.isGraphsError = true
|
||||
state.isLoadingGraphs = false
|
||||
}
|
||||
})
|
||||
.addCase(getEntities.fulfilled, (state, action) => {
|
||||
if (action.payload.isFavorite) {
|
||||
state.favoriteEntities = action.payload.data.entities
|
||||
state.favoriteEntitiesCount = action.payload.data.count
|
||||
} else {
|
||||
state.entities = action.payload.data.entities
|
||||
state.entitiesCount = action.payload.data.count
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
export const { setActiveTab, setActiveEntityId } = dashboard.actions;
|
||||
|
||||
export const selectDashboardGraphs = (state: RootState) => ({
|
||||
graphs: state.dashboard.graphs,
|
||||
graphsCount: state.dashboard.graphsCount,
|
||||
activeGraph: state.dashboard.activeGraph,
|
||||
isLoadingGraphs: state.dashboard.isLoadingGraphs,
|
||||
isLoadingFavoriteGraphs: state.dashboard.isLoadingFavoriteGraphs,
|
||||
isGraphsError: state.dashboard.isGraphsError,
|
||||
isFavoriteGraphsError: state.dashboard.isFavoriteGraphsError,
|
||||
favoriteGraphs: state.dashboard.favoriteGraphs,
|
||||
})
|
||||
export const selectDashboardEntities = (state: RootState) => ({
|
||||
entities: state.dashboard.entities,
|
||||
favoriteEntities: state.dashboard.favoriteEntities,
|
||||
entitiesCount: state.dashboard.entitiesCount,
|
||||
favoriteEntitiesCount: state.dashboard.favoriteEntitiesCount,
|
||||
isLoadingEntities: state.dashboard.isLoadingEntities,
|
||||
isLoadingFavoriteEntities: state.dashboard.isLoadingFavoriteEntities,
|
||||
isEntitiesError: state.dashboard.isEntitiesError,
|
||||
isFavoriteEntitiesError: state.dashboard.isFavoriteEntitesError
|
||||
});
|
||||
export const selectActiveTab = (state: RootState) => state.dashboard.activeTab
|
||||
export const selectActiveEntity = (state: RootState) => state.dashboard.entities.filter((entity) => entity.uuid === state.dashboard.activeEntityId)[0]
|
||||
|
||||
export default dashboard.reducer;
|
||||
@@ -1,7 +1,9 @@
|
||||
import { BASE_URL, LS_USER_KEY } from "@/app/api";
|
||||
import { api } from "@/app/api";
|
||||
import { BASE_URL, LS_USER_KEY, lUserDefault } from "@/app/baseApi";
|
||||
import { useAppDispatch } from "@/app/hooks";
|
||||
import { useEffectOnce } from "@/components/utils";
|
||||
import { setIsAuthenticated, setUser } from "@/features/account/accountSlice";
|
||||
import { lStorage } from "@/app/utilities";
|
||||
import { setIsAuthenticated } from "@/features/account/accountSlice";
|
||||
import { useEffect } from "react";
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
|
||||
export default function CallbackPage() {
|
||||
@@ -26,24 +28,26 @@ export default function CallbackPage() {
|
||||
params.state
|
||||
).then((resp: JSONObject) => {
|
||||
if (resp?.status === "ok") {
|
||||
lStorage(LS_USER_KEY, lUserDefault(true))
|
||||
dispatch(setIsAuthenticated(true))
|
||||
if (inIframe()) window.parent.postMessage({
|
||||
tag: "Casdoor",
|
||||
type: "SilentSignin",
|
||||
data: "success"
|
||||
}, "*");
|
||||
dispatch(setIsAuthenticated(true))
|
||||
navigate("/app/dashboard/graphs", { replace: true })
|
||||
} else {
|
||||
console.error(resp)
|
||||
localStorage.removeItem(LS_USER_KEY)
|
||||
dispatch(setIsAuthenticated(false))
|
||||
navigate("/", { replace: true })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
useEffectOnce(() => {
|
||||
useEffect(() => {
|
||||
login()
|
||||
})
|
||||
}, [])
|
||||
|
||||
return <></>
|
||||
}
|
||||
@@ -34,6 +34,15 @@
|
||||
jsonpointer "^5.0.0"
|
||||
leven "^3.1.0"
|
||||
|
||||
"@apidevtools/json-schema-ref-parser@9.0.6":
|
||||
version "9.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz#5d9000a3ac1fd25404da886da6b266adcd99cf1c"
|
||||
integrity sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg==
|
||||
dependencies:
|
||||
"@jsdevtools/ono" "^7.1.3"
|
||||
call-me-maybe "^1.0.1"
|
||||
js-yaml "^3.13.1"
|
||||
|
||||
"@apidevtools/json-schema-ref-parser@9.0.9":
|
||||
version "9.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.9.tgz#d720f9256e3609621280584f2b47ae165359268b"
|
||||
@@ -44,6 +53,29 @@
|
||||
call-me-maybe "^1.0.1"
|
||||
js-yaml "^4.1.0"
|
||||
|
||||
"@apidevtools/openapi-schemas@^2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/openapi-schemas/-/openapi-schemas-2.1.0.tgz#9fa08017fb59d80538812f03fc7cac5992caaa17"
|
||||
integrity sha512-Zc1AlqrJlX3SlpupFGpiLi2EbteyP7fXmUOGup6/DnkRgjP9bgMM/ag+n91rsv0U1Gpz0H3VILA/o3bW7Ua6BQ==
|
||||
|
||||
"@apidevtools/swagger-methods@^3.0.2":
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/swagger-methods/-/swagger-methods-3.0.2.tgz#b789a362e055b0340d04712eafe7027ddc1ac267"
|
||||
integrity sha512-QAkD5kK2b1WfjDS/UQn/qQkbwF31uqRjPTrsCs5ZG9BQGAkjwvqGFjjPqAuzac/IYzpPtRzjCP1WrTuAIjMrXg==
|
||||
|
||||
"@apidevtools/swagger-parser@^10.0.2", "@apidevtools/swagger-parser@^10.1.0":
|
||||
version "10.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@apidevtools/swagger-parser/-/swagger-parser-10.1.0.tgz#a987d71e5be61feb623203be0c96e5985b192ab6"
|
||||
integrity sha512-9Kt7EuS/7WbMAUv2gSziqjvxwDbFSg3Xeyfuj5laUODX8o/k/CpsAKiQ8W7/R88eXFTMbJYg6+7uAmOWNKmwnw==
|
||||
dependencies:
|
||||
"@apidevtools/json-schema-ref-parser" "9.0.6"
|
||||
"@apidevtools/openapi-schemas" "^2.1.0"
|
||||
"@apidevtools/swagger-methods" "^3.0.2"
|
||||
"@jsdevtools/ono" "^7.1.3"
|
||||
ajv "^8.6.3"
|
||||
ajv-draft-04 "^1.0.0"
|
||||
call-me-maybe "^1.0.1"
|
||||
|
||||
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.8.3":
|
||||
version "7.22.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e"
|
||||
@@ -1423,6 +1455,11 @@
|
||||
resolved "https://registry.yarnpkg.com/@excalidraw/excalidraw/-/excalidraw-0.16.1.tgz#a928945d567a1f5c0aa75bd1b1c05b50329eb27a"
|
||||
integrity sha512-4zirHk7dNx6SVq2jQmYOLliqAa1h3WPVqHM5qtJyhD769VsOqwlkopAcnZMb3G1PeIMm6cf2F31quS5MVqvoOQ==
|
||||
|
||||
"@exodus/schemasafe@^1.0.0-rc.2":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@exodus/schemasafe/-/schemasafe-1.3.0.tgz#731656abe21e8e769a7f70a4d833e6312fe59b7f"
|
||||
integrity sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==
|
||||
|
||||
"@headlessui/react@^1.7.7":
|
||||
version "1.7.17"
|
||||
resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.7.17.tgz#a0ec23af21b527c030967245fd99776aa7352bc6"
|
||||
@@ -2197,6 +2234,19 @@
|
||||
resolved "https://registry.yarnpkg.com/@rooks/use-mutation-observer/-/use-mutation-observer-4.11.2.tgz#a0466c4338e0a4487ea19253c86bcd427c29f4af"
|
||||
integrity sha512-vpsdrZdr6TkB1zZJcHx+fR1YC/pHs2BaqcuYiEGjBVbwY5xcC49+h0hAUtQKHth3oJqXfIX/Ng8S7s5HFHdM/A==
|
||||
|
||||
"@rtk-query/codegen-openapi@^1.1.3":
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@rtk-query/codegen-openapi/-/codegen-openapi-1.1.3.tgz#ba382103db0ebf7cd7e9de529e1784eabb0c818b"
|
||||
integrity sha512-kmTBI+LZMeT0EXWYJ7xqTWqbFZ7SGxN3caTYkkBodidDtblWxHfLzcPhAT70IocK4/jo7YfPkM+XXQYJyyqzdQ==
|
||||
dependencies:
|
||||
"@apidevtools/swagger-parser" "^10.0.2"
|
||||
commander "^6.2.0"
|
||||
oazapfts "^4.8.0"
|
||||
prettier "^2.2.1"
|
||||
semver "^7.3.5"
|
||||
swagger2openapi "^7.0.4"
|
||||
typescript "^5.0.0"
|
||||
|
||||
"@rushstack/eslint-patch@^1.1.0":
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz#5f1b518ec5fa54437c0b7c4a821546c64fed6922"
|
||||
@@ -3573,6 +3623,11 @@ agent-base@6:
|
||||
dependencies:
|
||||
debug "4"
|
||||
|
||||
ajv-draft-04@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ajv-draft-04/-/ajv-draft-04-1.0.0.tgz#3b64761b268ba0b9e668f0b41ba53fce0ad77fc8"
|
||||
integrity sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==
|
||||
|
||||
ajv-formats@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ajv-formats/-/ajv-formats-2.1.1.tgz#6e669400659eb74973bbf2e33327180a0996b520"
|
||||
@@ -3602,7 +3657,7 @@ ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5:
|
||||
json-schema-traverse "^0.4.1"
|
||||
uri-js "^4.2.2"
|
||||
|
||||
ajv@^8.0.0, ajv@^8.6.0, ajv@^8.9.0:
|
||||
ajv@^8.0.0, ajv@^8.6.0, ajv@^8.6.3, ajv@^8.9.0:
|
||||
version "8.12.0"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1"
|
||||
integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==
|
||||
@@ -4333,6 +4388,15 @@ cliui@^7.0.2:
|
||||
strip-ansi "^6.0.0"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
cliui@^8.0.1:
|
||||
version "8.0.1"
|
||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa"
|
||||
integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==
|
||||
dependencies:
|
||||
string-width "^4.2.0"
|
||||
strip-ansi "^6.0.1"
|
||||
wrap-ansi "^7.0.0"
|
||||
|
||||
clone-deep@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387"
|
||||
@@ -4440,6 +4504,11 @@ commander@^4.0.0:
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
|
||||
integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
|
||||
|
||||
commander@^6.2.0:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
|
||||
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
|
||||
|
||||
commander@^7.2.0:
|
||||
version "7.2.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7"
|
||||
@@ -5410,6 +5479,11 @@ es-to-primitive@^1.2.1:
|
||||
is-date-object "^1.0.1"
|
||||
is-symbol "^1.0.2"
|
||||
|
||||
es6-promise@^3.2.1:
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
|
||||
integrity sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==
|
||||
|
||||
escalade@^3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
|
||||
@@ -5846,6 +5920,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
|
||||
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
|
||||
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
|
||||
|
||||
fast-safe-stringify@^2.0.7:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz#c406a83b6e70d9e35ce3b30a81141df30aeba884"
|
||||
integrity sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==
|
||||
|
||||
fastq@^1.6.0:
|
||||
version "1.15.0"
|
||||
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a"
|
||||
@@ -6485,6 +6564,11 @@ http-proxy@^1.18.1:
|
||||
follow-redirects "^1.0.0"
|
||||
requires-port "^1.0.0"
|
||||
|
||||
http2-client@^1.2.5:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/http2-client/-/http2-client-1.3.5.tgz#20c9dc909e3cc98284dd20af2432c524086df181"
|
||||
integrity sha512-EC2utToWl4RKfs5zd36Mxq7nzHHBuomZboI0yYL6Y0RmBgT7Sgkq4rQ0ezFTYoIsSs7Tm9SJe+o2FcAg6GBhGA==
|
||||
|
||||
https-proxy-agent@^5.0.0:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6"
|
||||
@@ -8108,7 +8192,7 @@ minimatch@^5.0.1:
|
||||
dependencies:
|
||||
brace-expansion "^2.0.1"
|
||||
|
||||
minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
|
||||
minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6, minimist@^1.2.8:
|
||||
version "1.2.8"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c"
|
||||
integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==
|
||||
@@ -8195,6 +8279,13 @@ no-case@^3.0.4:
|
||||
lower-case "^2.0.2"
|
||||
tslib "^2.0.3"
|
||||
|
||||
node-fetch-h2@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch-h2/-/node-fetch-h2-2.3.0.tgz#c6188325f9bd3d834020bf0f2d6dc17ced2241ac"
|
||||
integrity sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==
|
||||
dependencies:
|
||||
http2-client "^1.2.5"
|
||||
|
||||
node-fetch@^2.6.1:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
||||
@@ -8217,6 +8308,13 @@ node-int64@^0.4.0:
|
||||
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
||||
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
|
||||
|
||||
node-readfiles@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/node-readfiles/-/node-readfiles-0.2.0.tgz#dbbd4af12134e2e635c245ef93ffcf6f60673a5d"
|
||||
integrity sha512-SU00ZarexNlE4Rjdm83vglt5Y9yiQ+XI1XpflWlb7q7UTN1JUItm69xMeiQCTxtTfnzt+83T8Cx+vI2ED++VDA==
|
||||
dependencies:
|
||||
es6-promise "^3.2.1"
|
||||
|
||||
node-releases@^2.0.13:
|
||||
version "2.0.13"
|
||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d"
|
||||
@@ -8263,6 +8361,63 @@ nwsapi@^2.2.0:
|
||||
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.7.tgz#738e0707d3128cb750dddcfe90e4610482df0f30"
|
||||
integrity sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==
|
||||
|
||||
oas-kit-common@^1.0.8:
|
||||
version "1.0.8"
|
||||
resolved "https://registry.yarnpkg.com/oas-kit-common/-/oas-kit-common-1.0.8.tgz#6d8cacf6e9097967a4c7ea8bcbcbd77018e1f535"
|
||||
integrity sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==
|
||||
dependencies:
|
||||
fast-safe-stringify "^2.0.7"
|
||||
|
||||
oas-linter@^3.2.2:
|
||||
version "3.2.2"
|
||||
resolved "https://registry.yarnpkg.com/oas-linter/-/oas-linter-3.2.2.tgz#ab6a33736313490659035ca6802dc4b35d48aa1e"
|
||||
integrity sha512-KEGjPDVoU5K6swgo9hJVA/qYGlwfbFx+Kg2QB/kd7rzV5N8N5Mg6PlsoCMohVnQmo+pzJap/F610qTodKzecGQ==
|
||||
dependencies:
|
||||
"@exodus/schemasafe" "^1.0.0-rc.2"
|
||||
should "^13.2.1"
|
||||
yaml "^1.10.0"
|
||||
|
||||
oas-resolver@^2.5.6:
|
||||
version "2.5.6"
|
||||
resolved "https://registry.yarnpkg.com/oas-resolver/-/oas-resolver-2.5.6.tgz#10430569cb7daca56115c915e611ebc5515c561b"
|
||||
integrity sha512-Yx5PWQNZomfEhPPOphFbZKi9W93CocQj18NlD2Pa4GWZzdZpSJvYwoiuurRI7m3SpcChrnO08hkuQDL3FGsVFQ==
|
||||
dependencies:
|
||||
node-fetch-h2 "^2.3.0"
|
||||
oas-kit-common "^1.0.8"
|
||||
reftools "^1.1.9"
|
||||
yaml "^1.10.0"
|
||||
yargs "^17.0.1"
|
||||
|
||||
oas-schema-walker@^1.1.5:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/oas-schema-walker/-/oas-schema-walker-1.1.5.tgz#74c3cd47b70ff8e0b19adada14455b5d3ac38a22"
|
||||
integrity sha512-2yucenq1a9YPmeNExoUa9Qwrt9RFkjqaMAA1X+U7sbb0AqBeTIdMHky9SQQ6iN94bO5NW0W4TRYXerG+BdAvAQ==
|
||||
|
||||
oas-validator@^5.0.8:
|
||||
version "5.0.8"
|
||||
resolved "https://registry.yarnpkg.com/oas-validator/-/oas-validator-5.0.8.tgz#387e90df7cafa2d3ffc83b5fb976052b87e73c28"
|
||||
integrity sha512-cu20/HE5N5HKqVygs3dt94eYJfBi0TsZvPVXDhbXQHiEityDN+RROTleefoKRKKJ9dFAF2JBkDHgvWj0sjKGmw==
|
||||
dependencies:
|
||||
call-me-maybe "^1.0.1"
|
||||
oas-kit-common "^1.0.8"
|
||||
oas-linter "^3.2.2"
|
||||
oas-resolver "^2.5.6"
|
||||
oas-schema-walker "^1.1.5"
|
||||
reftools "^1.1.9"
|
||||
should "^13.2.1"
|
||||
yaml "^1.10.0"
|
||||
|
||||
oazapfts@^4.8.0:
|
||||
version "4.10.0"
|
||||
resolved "https://registry.yarnpkg.com/oazapfts/-/oazapfts-4.10.0.tgz#020eb999e591d67a9624e055b488be9f4c385a0a"
|
||||
integrity sha512-JH/h2IygXkoT+rB9wopQmPieZZwr7gN+x6REct5Ji1kxoQgwdnMApXjUFnjyT8QLI2YcVWtRidMgHVs2k7vaFw==
|
||||
dependencies:
|
||||
"@apidevtools/swagger-parser" "^10.1.0"
|
||||
lodash "^4.17.21"
|
||||
minimist "^1.2.8"
|
||||
swagger2openapi "^7.0.8"
|
||||
typescript "^5.2.2"
|
||||
|
||||
object-assign@^4.0.1, object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
@@ -9177,6 +9332,11 @@ prelude-ls@~1.1.2:
|
||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||
integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==
|
||||
|
||||
prettier@^2.2.1:
|
||||
version "2.8.8"
|
||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
|
||||
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
|
||||
|
||||
pretty-bytes@^5.3.0, pretty-bytes@^5.4.1:
|
||||
version "5.6.0"
|
||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
|
||||
@@ -9646,6 +9806,11 @@ reflect.getprototypeof@^1.0.4:
|
||||
globalthis "^1.0.3"
|
||||
which-builtin-type "^1.1.3"
|
||||
|
||||
reftools@^1.1.9:
|
||||
version "1.1.9"
|
||||
resolved "https://registry.yarnpkg.com/reftools/-/reftools-1.1.9.tgz#e16e19f662ccd4648605312c06d34e5da3a2b77e"
|
||||
integrity sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==
|
||||
|
||||
regenerate-unicode-properties@^10.1.0:
|
||||
version "10.1.1"
|
||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz#6b0e05489d9076b04c436f318d9b067bba459480"
|
||||
@@ -10078,6 +10243,50 @@ shell-quote@^1.7.3, shell-quote@^1.8.1:
|
||||
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680"
|
||||
integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==
|
||||
|
||||
should-equal@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3"
|
||||
integrity sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==
|
||||
dependencies:
|
||||
should-type "^1.4.0"
|
||||
|
||||
should-format@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1"
|
||||
integrity sha512-hZ58adtulAk0gKtua7QxevgUaXTTXxIi8t41L3zo9AHvjXO1/7sdLECuHeIN2SRtYXpNkmhoUP2pdeWgricQ+Q==
|
||||
dependencies:
|
||||
should-type "^1.3.0"
|
||||
should-type-adaptors "^1.0.1"
|
||||
|
||||
should-type-adaptors@^1.0.1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a"
|
||||
integrity sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==
|
||||
dependencies:
|
||||
should-type "^1.3.0"
|
||||
should-util "^1.0.0"
|
||||
|
||||
should-type@^1.3.0, should-type@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3"
|
||||
integrity sha512-MdAsTu3n25yDbIe1NeN69G4n6mUnJGtSJHygX3+oN0ZbO3DTiATnf7XnYJdGT42JCXurTb1JI0qOBR65shvhPQ==
|
||||
|
||||
should-util@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.1.tgz#fb0d71338f532a3a149213639e2d32cbea8bcb28"
|
||||
integrity sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==
|
||||
|
||||
should@^13.2.1:
|
||||
version "13.2.3"
|
||||
resolved "https://registry.yarnpkg.com/should/-/should-13.2.3.tgz#96d8e5acf3e97b49d89b51feaa5ae8d07ef58f10"
|
||||
integrity sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==
|
||||
dependencies:
|
||||
should-equal "^2.0.0"
|
||||
should-format "^3.0.3"
|
||||
should-type "^1.4.0"
|
||||
should-type-adaptors "^1.0.1"
|
||||
should-util "^1.0.0"
|
||||
|
||||
side-channel@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
|
||||
@@ -10269,7 +10478,7 @@ string-natural-compare@^3.0.1:
|
||||
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
|
||||
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0:
|
||||
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
@@ -10491,6 +10700,23 @@ svgo@^2.7.0:
|
||||
picocolors "^1.0.0"
|
||||
stable "^0.1.8"
|
||||
|
||||
swagger2openapi@^7.0.4, swagger2openapi@^7.0.8:
|
||||
version "7.0.8"
|
||||
resolved "https://registry.yarnpkg.com/swagger2openapi/-/swagger2openapi-7.0.8.tgz#12c88d5de776cb1cbba758994930f40ad0afac59"
|
||||
integrity sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==
|
||||
dependencies:
|
||||
call-me-maybe "^1.0.1"
|
||||
node-fetch "^2.6.1"
|
||||
node-fetch-h2 "^2.3.0"
|
||||
node-readfiles "^0.2.0"
|
||||
oas-kit-common "^1.0.8"
|
||||
oas-resolver "^2.5.6"
|
||||
oas-schema-walker "^1.1.5"
|
||||
oas-validator "^5.0.8"
|
||||
reftools "^1.1.9"
|
||||
yaml "^1.10.0"
|
||||
yargs "^17.0.1"
|
||||
|
||||
swc-loader@^0.1.15:
|
||||
version "0.1.16"
|
||||
resolved "https://registry.yarnpkg.com/swc-loader/-/swc-loader-0.1.16.tgz#4c718d698e518f3e6ceb9f7872c1855cdb187066"
|
||||
@@ -10831,6 +11057,11 @@ typescript@^4.9.4:
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
|
||||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
|
||||
|
||||
typescript@^5.0.0, typescript@^5.2.2:
|
||||
version "5.2.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
|
||||
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
|
||||
|
||||
uglify-js@^3.1.4:
|
||||
version "3.17.4"
|
||||
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c"
|
||||
@@ -11616,6 +11847,11 @@ yargs-parser@^20.2.2:
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||
|
||||
yargs-parser@^21.1.1:
|
||||
version "21.1.1"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
|
||||
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
|
||||
|
||||
yargs@^16.2.0:
|
||||
version "16.2.0"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
|
||||
@@ -11629,6 +11865,19 @@ yargs@^16.2.0:
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^20.2.2"
|
||||
|
||||
yargs@^17.0.1:
|
||||
version "17.7.2"
|
||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
|
||||
integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
|
||||
dependencies:
|
||||
cliui "^8.0.1"
|
||||
escalade "^3.1.1"
|
||||
get-caller-file "^2.0.5"
|
||||
require-directory "^2.1.1"
|
||||
string-width "^4.2.3"
|
||||
y18n "^5.0.5"
|
||||
yargs-parser "^21.1.1"
|
||||
|
||||
yjs@^13.6.8:
|
||||
version "13.6.8"
|
||||
resolved "https://registry.yarnpkg.com/yjs/-/yjs-13.6.8.tgz#0d6cebf4d7e69b08ede5ecf6368ddbd9c7603c2e"
|
||||
|
||||
525
ob/_casdoor/init_data.json
Normal file
525
ob/_casdoor/init_data.json
Normal file
@@ -0,0 +1,525 @@
|
||||
{
|
||||
"applications": [
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "app-built-in",
|
||||
"createdTime": "2023-10-30T19:34:07Z",
|
||||
"displayName": "Casdoor",
|
||||
"logo": "https://cdn.casbin.org/img/casdoor-logo_1185x256.png",
|
||||
"homepageUrl": "https://casdoor.org",
|
||||
"description": "",
|
||||
"organization": "built-in",
|
||||
"cert": "cert-built-in",
|
||||
"enablePassword": true,
|
||||
"enableSignUp": true,
|
||||
"enableSigninSession": false,
|
||||
"enableAutoSignin": false,
|
||||
"enableCodeSignin": false,
|
||||
"enableSamlCompress": false,
|
||||
"enableSamlC14n10": false,
|
||||
"enableWebAuthn": false,
|
||||
"enableLinkWithEmail": false,
|
||||
"orgChoiceMode": "",
|
||||
"samlReplyUrl": "",
|
||||
"providers": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "provider_captcha_default",
|
||||
"canSignUp": false,
|
||||
"canSignIn": false,
|
||||
"canUnlink": false,
|
||||
"prompted": false,
|
||||
"signupGroup": "",
|
||||
"rule": "None",
|
||||
"provider": null
|
||||
}
|
||||
],
|
||||
"signupItems": [
|
||||
{
|
||||
"name": "ID",
|
||||
"visible": false,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "Random"
|
||||
},
|
||||
{
|
||||
"name": "Username",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Display name",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Password",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Confirm password",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "Normal"
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Agreement",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
}
|
||||
],
|
||||
"grantTypes": null,
|
||||
"organizationObj": null,
|
||||
"certPublicKey": "",
|
||||
"tags": [],
|
||||
"invitationCodes": null,
|
||||
"samlAttributes": null,
|
||||
"clientId": "b74267527c3795eab9cd",
|
||||
"clientSecret": "***",
|
||||
"redirectUris": [],
|
||||
"tokenFormat": "",
|
||||
"expireInHours": 168,
|
||||
"refreshExpireInHours": 0,
|
||||
"signupUrl": "",
|
||||
"signinUrl": "",
|
||||
"forgetUrl": "",
|
||||
"affiliationUrl": "",
|
||||
"termsOfUse": "",
|
||||
"signupHtml": "",
|
||||
"signinHtml": "",
|
||||
"themeData": null,
|
||||
"formCss": "",
|
||||
"formCssMobile": "",
|
||||
"formOffset": 2,
|
||||
"formSideHtml": "",
|
||||
"formBackgroundUrl": ""
|
||||
},
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "app_osintbuddy",
|
||||
"createdTime": "2023-10-30T13:42:29-06:00",
|
||||
"displayName": "OSINTBuddy Application",
|
||||
"logo": "https://raw.githubusercontent.com/jerlendds/osintbuddy/develop/ob/_assets/watermark.png",
|
||||
"homepageUrl": "https://osintbuddy.com",
|
||||
"description": "",
|
||||
"organization": "org_osintbuddy",
|
||||
"cert": "cert-osintbuddy",
|
||||
"enablePassword": true,
|
||||
"enableSignUp": true,
|
||||
"enableSigninSession": false,
|
||||
"enableAutoSignin": false,
|
||||
"enableCodeSignin": false,
|
||||
"enableSamlCompress": false,
|
||||
"enableSamlC14n10": false,
|
||||
"enableWebAuthn": false,
|
||||
"enableLinkWithEmail": false,
|
||||
"orgChoiceMode": "",
|
||||
"samlReplyUrl": "",
|
||||
"providers": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "provider_captcha_default",
|
||||
"canSignUp": false,
|
||||
"canSignIn": false,
|
||||
"canUnlink": false,
|
||||
"prompted": false,
|
||||
"signupGroup": "",
|
||||
"rule": "",
|
||||
"provider": null
|
||||
}
|
||||
],
|
||||
"signupItems": [
|
||||
{
|
||||
"name": "ID",
|
||||
"visible": false,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "Random"
|
||||
},
|
||||
{
|
||||
"name": "Username",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Display name",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Password",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Confirm password",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "Normal"
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"visible": true,
|
||||
"required": false,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Agreement",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"label": "",
|
||||
"placeholder": "",
|
||||
"rule": "None"
|
||||
}
|
||||
],
|
||||
"grantTypes": [
|
||||
"authorization_code"
|
||||
],
|
||||
"organizationObj": null,
|
||||
"certPublicKey": "",
|
||||
"tags": [],
|
||||
"invitationCodes": [
|
||||
"dghp9u"
|
||||
],
|
||||
"samlAttributes": null,
|
||||
"clientId": "1d69456af504f585b7bf",
|
||||
"clientSecret": "1a867fb714bbdf675529b6e9f0b4e74c13b0814a",
|
||||
"redirectUris": [
|
||||
"http://localhost:3000/callback",
|
||||
"http://0.0.0.0:3000/callback",
|
||||
"http://127.0.0.1:3000/callback"
|
||||
],
|
||||
"tokenFormat": "JWT",
|
||||
"expireInHours": 168,
|
||||
"refreshExpireInHours": 168,
|
||||
"signupUrl": "",
|
||||
"signinUrl": "",
|
||||
"forgetUrl": "",
|
||||
"affiliationUrl": "",
|
||||
"termsOfUse": "",
|
||||
"signupHtml": "",
|
||||
"signinHtml": "",
|
||||
"themeData": null,
|
||||
"formCss": "",
|
||||
"formCssMobile": "",
|
||||
"formOffset": 2,
|
||||
"formSideHtml": "",
|
||||
"formBackgroundUrl": ""
|
||||
}
|
||||
],
|
||||
"organizations": [
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "org_osintbuddy",
|
||||
"displayName": "OSINTBuddy Organization",
|
||||
"websiteUrl": "https://osintbuddy.com",
|
||||
"favicon": "https://raw.githubusercontent.com/jerlendds/osintbuddy/develop/ob/_assets/icon.png",
|
||||
"passwordType": "bcrypt",
|
||||
"passwordSalt": "",
|
||||
"passwordOptions": ["AtLeast6"],
|
||||
"countryCodes": ["US", "GB", "ES", "FR", "DE", "CN", "JP", "KR", "VN", "ID", "SG", "IN", "IT", "MY", "TR", "DZ", "IL", "PH", "NL", "PL", "FI", "SE", "UA", "KZ"],
|
||||
"defaultAvatar": "https://raw.githubusercontent.com/jerlendds/osintbuddy/develop/ob/_assets/icon.png",
|
||||
"defaultApplication": "app_osintbuddy",
|
||||
"tags": [],
|
||||
"languages": ["en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vi", "it", "ms", "tr","ar", "he", "nl", "pl", "fi", "sv", "uk", "kk", "fa"],
|
||||
"masterPassword": "osintbuddy",
|
||||
"defaultPassword": "osintbuddy",
|
||||
"initScore": 2000,
|
||||
"enableSoftDeletion": false,
|
||||
"isProfilePublic": true,
|
||||
"accountItems": []
|
||||
}
|
||||
],
|
||||
"users": [
|
||||
{
|
||||
"owner": "org_osintbuddy",
|
||||
"name": "osintbuddy",
|
||||
"createdTime": "2023-10-30T13:49:26-06:00",
|
||||
"updatedTime": "2023-10-30T20:17:47Z",
|
||||
"id": "84436c0e-fbb1-4d68-a21d-0924ba764ada",
|
||||
"externalId": "",
|
||||
"type": "normal-user",
|
||||
"password": "osintbuddy",
|
||||
"passwordSalt": "",
|
||||
"passwordType": "plain",
|
||||
"displayName": "OSINTBuddy",
|
||||
"firstName": "",
|
||||
"lastName": "",
|
||||
"avatar": "https://cdn.casbin.org/img/casbin.svg",
|
||||
"avatarType": "",
|
||||
"permanentAvatar": "",
|
||||
"email": "admin@osintbuddy.com",
|
||||
"emailVerified": false,
|
||||
"phone": "71785200093",
|
||||
"countryCode": "US",
|
||||
"region": "",
|
||||
"location": "",
|
||||
"address": [],
|
||||
"affiliation": "OpenInfoLabs",
|
||||
"title": "",
|
||||
"idCardType": "",
|
||||
"idCard": "",
|
||||
"homepage": "",
|
||||
"bio": "",
|
||||
"tag": "staff",
|
||||
"language": "",
|
||||
"gender": "",
|
||||
"birthday": "",
|
||||
"education": "",
|
||||
"score": 2000,
|
||||
"karma": 0,
|
||||
"ranking": 1,
|
||||
"isDefaultAvatar": false,
|
||||
"isOnline": false,
|
||||
"isAdmin": true,
|
||||
"isForbidden": false,
|
||||
"isDeleted": false,
|
||||
"signupApplication": "app_osintbuddy",
|
||||
"hash": "",
|
||||
"preHash": "",
|
||||
"accessKey": "",
|
||||
"accessSecret": "",
|
||||
"createdIp": "",
|
||||
"lastSigninTime": "",
|
||||
"lastSigninIp": "",
|
||||
"github": "",
|
||||
"google": "",
|
||||
"qq": "",
|
||||
"wechat": "",
|
||||
"facebook": "",
|
||||
"dingtalk": "",
|
||||
"weibo": "",
|
||||
"gitee": "",
|
||||
"linkedin": "",
|
||||
"wecom": "",
|
||||
"lark": "",
|
||||
"gitlab": "",
|
||||
"adfs": "",
|
||||
"baidu": "",
|
||||
"alipay": "",
|
||||
"casdoor": "",
|
||||
"infoflow": "",
|
||||
"apple": "",
|
||||
"azuread": "",
|
||||
"slack": "",
|
||||
"steam": "",
|
||||
"bilibili": "",
|
||||
"okta": "",
|
||||
"douyin": "",
|
||||
"line": "",
|
||||
"amazon": "",
|
||||
"auth0": "",
|
||||
"battlenet": "",
|
||||
"bitbucket": "",
|
||||
"box": "",
|
||||
"cloudfoundry": "",
|
||||
"dailymotion": "",
|
||||
"deezer": "",
|
||||
"digitalocean": "",
|
||||
"discord": "",
|
||||
"dropbox": "",
|
||||
"eveonline": "",
|
||||
"fitbit": "",
|
||||
"gitea": "",
|
||||
"heroku": "",
|
||||
"influxcloud": "",
|
||||
"instagram": "",
|
||||
"intercom": "",
|
||||
"kakao": "",
|
||||
"lastfm": "",
|
||||
"mailru": "",
|
||||
"meetup": "",
|
||||
"microsoftonline": "",
|
||||
"naver": "",
|
||||
"nextcloud": "",
|
||||
"onedrive": "",
|
||||
"oura": "",
|
||||
"patreon": "",
|
||||
"paypal": "",
|
||||
"salesforce": "",
|
||||
"shopify": "",
|
||||
"soundcloud": "",
|
||||
"spotify": "",
|
||||
"strava": "",
|
||||
"stripe": "",
|
||||
"tiktok": "",
|
||||
"tumblr": "",
|
||||
"twitch": "",
|
||||
"twitter": "",
|
||||
"typetalk": "",
|
||||
"uber": "",
|
||||
"vk": "",
|
||||
"wepay": "",
|
||||
"xero": "",
|
||||
"yahoo": "",
|
||||
"yammer": "",
|
||||
"yandex": "",
|
||||
"zoom": "",
|
||||
"metamask": "",
|
||||
"web3onboard": "",
|
||||
"custom": "",
|
||||
"webauthnCredentials": null,
|
||||
"preferredMfaType": "",
|
||||
"recoveryCodes": null,
|
||||
"totpSecret": "",
|
||||
"mfaPhoneEnabled": false,
|
||||
"mfaEmailEnabled": false,
|
||||
"ldap": "",
|
||||
"properties": {},
|
||||
"roles": null,
|
||||
"permissions": null,
|
||||
"groups": [],
|
||||
"lastSigninWrongTime": "",
|
||||
"signinWrongTimes": 0,
|
||||
"managedAccounts": null
|
||||
}
|
||||
],
|
||||
"certs": [
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "cert-built-in",
|
||||
"createdTime": "2023-10-30T19:34:07Z",
|
||||
"displayName": "Built-in Cert",
|
||||
"scope": "JWT",
|
||||
"type": "x509",
|
||||
"cryptoAlgorithm": "RS256",
|
||||
"bitSize": 4096,
|
||||
"expireInYears": 20,
|
||||
"certificate": "-----BEGIN CERTIFICATE-----\nMIIE3TCCAsWgAwIBAgIDAeJAMA0GCSqGSIb3DQEBCwUAMCgxDjAMBgNVBAoTBWFk\nbWluMRYwFAYDVQQDEw1jZXJ0LWJ1aWx0LWluMB4XDTIzMTAzMDE5MzQwN1oXDTQz\nMTAzMDE5MzQwN1owKDEOMAwGA1UEChMFYWRtaW4xFjAUBgNVBAMTDWNlcnQtYnVp\nbHQtaW4wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC6G1i4WxpJS9I7\nswlERGCl5h3l8wYBIDRZIo/gM33XT22v4/EOG6DIIrX5x8StTaMhJ+4Uy48J1Jeg\nbGV0uMgEQITciQeP4ZQVHuHrmzejRb7Cu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C5AoIBABMQ8MbTYVykKkX+p2x4PAFYnqC6\nI2SSAXe5hZeYtTjMSMzcA/drU6tAV50RHYYbtecE9lAuP7I5QEkzSlpFJvM973AU\n6O9yVPgfzXRq/YqHBBkvM1cTTJa8bAzWcHJNjOTscM9gnvuWpse3fahat3+j+mN7\n16LcOETevej+xIGA59yb3un2ol537ivbOBaeX0AO7ptGt1JZrx9IEHDhkNI/u7vH\nbIyYlzScqdMLWcr4IVxmPYfLC17znioN5FaRKlbYYyPnXgUlzTsOvUTcJCOULwh6\n+LpstVM68sx0t17Cyyf7N/SZPNoVZZKpWkbOPFcd5VUyrPgkQyQJcjVpthU=\n-----END RSA PRIVATE KEY-----\n"
|
||||
},
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "cert-osintbuddy",
|
||||
"createdTime": "2023-10-30T13:34:44-06:00",
|
||||
"displayName": "OSINTBuddy Cert",
|
||||
"scope": "JWT",
|
||||
"type": "x509",
|
||||
"cryptoAlgorithm": "RS256",
|
||||
"bitSize": 4096,
|
||||
"expireInYears": 20,
|
||||
"certificate": "-----BEGIN CERTIFICATE-----\nMIIE2TCCAsGgAwIBAgIDAeJAMA0GCSqGSIb3DQEBCwUAMCYxDjAMBgNVBAoTBWFk\nbWluMRQwEgYDVQQDDAtjZXJ0X2F2c3QyYzAeFw0yMzEwMzAxOTM0NDVaFw00MzEw\nMzAxOTM0NDVaMCYxDjAMBgNVBAoTBWFkbWluMRQwEgYDVQQDDAtjZXJ0X2F2c3Qy\nYzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAM7Pq/elUZwbQGUunKqG\nGUnBQhS/4eBW6J+oKHQDemMLbbjL+8AHO8JcDtscOO8EQUQUNFsB1mmNlvgP8Srg\nL6rQTsDExFS1dbBZjRHKKdGsocHrZ+CIeVuqRlOuX/gJ5lvF4EmFr95JTktMoBg4\noJPFqM/SbcMAVZzExjYoXf6F0DT/Pl/J2o73ED3Q6rPpt05Qo7u9amN/FNpRm619\nLCq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K4pCkPrmIII6unqH5zYi\ngORXLYvTgKwlaZnZyWSnz84H6VAeWA7Iq275Yz/XOV8BvQt667j/9g59qOAr6gNJ\nQjUwRftslgesf8BkNi3NXzQy922QL1vniZyeSDglb2CNzScrxwVOq35odWRm3v/U\nR7QFGaSclnmcAkiYj1+jCLWs2cXQZj6AX9wRCsehifRKjfbI4a812PbzyZro\n-----END RSA PRIVATE KEY-----\n"
|
||||
}
|
||||
],
|
||||
"models": [],
|
||||
"permissions": [],
|
||||
"providers": [
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "provider_captcha_default",
|
||||
"createdTime": "2023-10-30T19:34:07Z",
|
||||
"displayName": "Captcha Default",
|
||||
"category": "Captcha",
|
||||
"type": "Default",
|
||||
"subType": "",
|
||||
"method": "",
|
||||
"clientId": "",
|
||||
"clientSecret": "",
|
||||
"clientId2": "",
|
||||
"clientSecret2": "",
|
||||
"cert": "",
|
||||
"customAuthUrl": "",
|
||||
"customTokenUrl": "",
|
||||
"customUserInfoUrl": "",
|
||||
"customLogo": "",
|
||||
"scopes": "",
|
||||
"userMapping": null,
|
||||
"host": "",
|
||||
"port": 0,
|
||||
"disableSsl": false,
|
||||
"title": "",
|
||||
"content": "",
|
||||
"receiver": "",
|
||||
"regionId": "",
|
||||
"signName": "",
|
||||
"templateCode": "",
|
||||
"appId": "",
|
||||
"endpoint": "",
|
||||
"intranetEndpoint": "",
|
||||
"domain": "",
|
||||
"bucket": "",
|
||||
"pathPrefix": "",
|
||||
"metadata": "",
|
||||
"idP": "",
|
||||
"issuerUrl": "",
|
||||
"enableSignAuthnRequest": false,
|
||||
"providerUrl": ""
|
||||
}
|
||||
],
|
||||
"products": [],
|
||||
"payments": [],
|
||||
"roles": [],
|
||||
"syncers": [],
|
||||
"webhooks": []
|
||||
}
|
||||
@@ -1,334 +0,0 @@
|
||||
{
|
||||
"organizations": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "",
|
||||
"displayName": "",
|
||||
"websiteUrl": "",
|
||||
"favicon": "",
|
||||
"passwordType": "plain",
|
||||
"passwordSalt": "",
|
||||
"passwordOptions": ["AtLeast6"],
|
||||
"countryCodes": ["US", "GB", "ES", "FR", "DE", "CN", "JP", "KR", "VN", "ID", "SG", "IN", "IT", "MY", "TR", "DZ", "IL", "PH", "NL", "PL", "FI", "SE", "UA", "KZ"],
|
||||
"defaultAvatar": "",
|
||||
"defaultApplication": "",
|
||||
"tags": [],
|
||||
"languages": ["en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vi", "it", "ms", "tr","ar", "he", "nl", "pl", "fi", "sv", "uk", "kk", "fa"],
|
||||
"masterPassword": "password",
|
||||
"defaultPassword": "password",
|
||||
"initScore": 2000,
|
||||
"enableSoftDeletion": false,
|
||||
"isProfilePublic": true,
|
||||
"accountItems": []
|
||||
}
|
||||
],
|
||||
"applications": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "",
|
||||
"displayName": "",
|
||||
"logo": "",
|
||||
"homepageUrl": "",
|
||||
"organization": "",
|
||||
"cert": "",
|
||||
"enablePassword": true,
|
||||
"enableSignUp": true,
|
||||
"clientId": "31d844a5e0d77ac99094",
|
||||
"clientSecret": "aef9074243ee936d41f013cd6f2aa6076e802769",
|
||||
"providers": [
|
||||
{
|
||||
"name": "",
|
||||
"canSignUp": true,
|
||||
"canSignIn": true,
|
||||
"canUnlink": false,
|
||||
"prompted": false,
|
||||
"alertType": "None"
|
||||
}
|
||||
],
|
||||
"signupItems": [
|
||||
{
|
||||
"name": "ID",
|
||||
"visible": false,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "Random"
|
||||
},
|
||||
{
|
||||
"name": "Username",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Display name",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Password",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Confirm password",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "None"
|
||||
},
|
||||
{
|
||||
"name": "Agreement",
|
||||
"visible": true,
|
||||
"required": true,
|
||||
"prompted": false,
|
||||
"rule": "None"
|
||||
}
|
||||
],
|
||||
"redirectUris": [""],
|
||||
"expireInHours": 168
|
||||
}
|
||||
],
|
||||
"users": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "",
|
||||
"type": "normal-user",
|
||||
"password": "",
|
||||
"displayName": "",
|
||||
"avatar": "",
|
||||
"email": "",
|
||||
"phone": "",
|
||||
"countryCode": "",
|
||||
"address": [],
|
||||
"affiliation": "",
|
||||
"tag": "",
|
||||
"score": 2000,
|
||||
"ranking": 1,
|
||||
"isAdmin": true,
|
||||
"isForbidden": false,
|
||||
"isDeleted": false,
|
||||
"signupApplication": "",
|
||||
"createdIp": ""
|
||||
}
|
||||
],
|
||||
"providers": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "",
|
||||
"displayName": "",
|
||||
"category": "",
|
||||
"type": ""
|
||||
}
|
||||
],
|
||||
"certs": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "",
|
||||
"displayName": "",
|
||||
"scope": "JWT",
|
||||
"type": "x509",
|
||||
"cryptoAlgorithm": "RS256",
|
||||
"bitSize": 4096,
|
||||
"expireInYears": 20,
|
||||
"certificate": "",
|
||||
"privateKey": ""
|
||||
}
|
||||
],
|
||||
"ldaps": [
|
||||
{
|
||||
"id": "",
|
||||
"owner": "",
|
||||
"serverName": "",
|
||||
"host": "",
|
||||
"port": 389,
|
||||
"username": "",
|
||||
"password": "",
|
||||
"baseDn": "",
|
||||
"autoSync": 0,
|
||||
"lastSync": ""
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "",
|
||||
"modelText": "",
|
||||
"displayName": ""
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
{
|
||||
"actions": [],
|
||||
"displayName": "",
|
||||
"effect": "",
|
||||
"isEnabled": true,
|
||||
"model": "",
|
||||
"name": "",
|
||||
"owner": "",
|
||||
"resourceType": "",
|
||||
"resources": [],
|
||||
"roles": [],
|
||||
"users": []
|
||||
}
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"currency": "",
|
||||
"detail": "",
|
||||
"displayName": "",
|
||||
"invoiceRemark": "",
|
||||
"invoiceTaxId": "",
|
||||
"invoiceTitle": "",
|
||||
"invoiceType": "",
|
||||
"invoiceUrl": "",
|
||||
"message": "",
|
||||
"name": "",
|
||||
"organization": "",
|
||||
"owner": "",
|
||||
"payUrl": "",
|
||||
"personEmail": "",
|
||||
"personIdCard": "",
|
||||
"personName": "",
|
||||
"personPhone": "",
|
||||
"price": 0,
|
||||
"productDisplayName": "",
|
||||
"productName": "",
|
||||
"provider": "",
|
||||
"returnUrl": "",
|
||||
"state": "",
|
||||
"tag": "",
|
||||
"type": "",
|
||||
"user": ""
|
||||
}
|
||||
],
|
||||
"products": [
|
||||
{
|
||||
"currency": "",
|
||||
"detail": "",
|
||||
"displayName": "",
|
||||
"image": "",
|
||||
"name": "",
|
||||
"owner": "",
|
||||
"price": 0,
|
||||
"providers": [],
|
||||
"quantity": 0,
|
||||
"returnUrl": "",
|
||||
"sold": 0,
|
||||
"state": "",
|
||||
"tag": ""
|
||||
}
|
||||
],
|
||||
"resources": [
|
||||
{
|
||||
"owner": "",
|
||||
"name": "",
|
||||
"user": "",
|
||||
"provider": "",
|
||||
"application": "",
|
||||
"tag": "",
|
||||
"parent": "",
|
||||
"fileName": "",
|
||||
"fileType": "",
|
||||
"fileFormat": "",
|
||||
"url": "",
|
||||
"description": ""
|
||||
}
|
||||
],
|
||||
"roles": [
|
||||
{
|
||||
"displayName": "",
|
||||
"isEnabled": true,
|
||||
"name": "",
|
||||
"owner": "",
|
||||
"roles": [],
|
||||
"users": []
|
||||
}
|
||||
],
|
||||
"syncers": [
|
||||
{
|
||||
"affiliationTable": "",
|
||||
"avatarBaseUrl": "",
|
||||
"database": "",
|
||||
"databaseType": "",
|
||||
"errorText": "",
|
||||
"host": "",
|
||||
"isEnabled": false,
|
||||
"name": "",
|
||||
"organization": "",
|
||||
"owner": "",
|
||||
"password": "",
|
||||
"port": 0,
|
||||
"syncInterval": 0,
|
||||
"table": "",
|
||||
"tableColumns": [
|
||||
{
|
||||
"casdoorName": "",
|
||||
"isHashed": true,
|
||||
"name": "",
|
||||
"type": "",
|
||||
"values": []
|
||||
}
|
||||
],
|
||||
"tablePrimaryKey": "",
|
||||
"type": "",
|
||||
"user": ""
|
||||
}
|
||||
],
|
||||
"tokens": [
|
||||
{
|
||||
"accessToken": "",
|
||||
"application": "",
|
||||
"code": "",
|
||||
"codeChallenge": "",
|
||||
"codeExpireIn": 0,
|
||||
"codeIsUsed": true,
|
||||
"createdTime": "",
|
||||
"expiresIn": 0,
|
||||
"name": "",
|
||||
"organization": "",
|
||||
"owner": "",
|
||||
"refreshToken": "",
|
||||
"scope": "",
|
||||
"tokenType": "",
|
||||
"user": ""
|
||||
}
|
||||
],
|
||||
"webhooks": [
|
||||
{
|
||||
"contentType": "",
|
||||
"events": [],
|
||||
"headers": [
|
||||
{
|
||||
"name": "",
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"isEnabled": true,
|
||||
"isUserExtended": true,
|
||||
"method": "",
|
||||
"name": "",
|
||||
"organization": "",
|
||||
"owner": "",
|
||||
"url": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user