Add the possibility to enable/disable default OAuths (#303)

This commit is contained in:
Riccardo Graziosi
2024-03-05 18:13:16 +01:00
committed by GitHub
parent 719f1ad4e9
commit 32d19cbe7c
31 changed files with 508 additions and 131 deletions

View File

@@ -14,6 +14,7 @@ export interface IOAuth {
callbackUrl?: string;
tenantId?: number;
defaultOAuthIsEnabled: boolean;
}
export interface IOAuthJSON {
@@ -32,6 +33,7 @@ export interface IOAuthJSON {
callback_url?: string;
tenant_id?: string;
default_o_auth_is_enabled: boolean;
}
export const oAuthJSON2JS = (oAuthJSON: IOAuthJSON): IOAuth => ({
@@ -50,6 +52,7 @@ export const oAuthJSON2JS = (oAuthJSON: IOAuthJSON): IOAuth => ({
callbackUrl: oAuthJSON.callback_url,
tenantId: oAuthJSON.tenant_id ? parseInt(oAuthJSON.tenant_id) : null,
defaultOAuthIsEnabled: oAuthJSON.default_o_auth_is_enabled,
});
export const oAuthJS2JSON = (oAuth: IOAuth) => ({
@@ -68,4 +71,5 @@ export const oAuthJS2JSON = (oAuth: IOAuth) => ({
callback_url: oAuth.callbackUrl,
tenant_id: oAuth.tenantId,
default_o_auth_is_enabled: oAuth.defaultOAuthIsEnabled,
});