mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 19:57:52 +01:00
Add the possibility to enable/disable default OAuths (#303)
This commit is contained in:
committed by
GitHub
parent
719f1ad4e9
commit
32d19cbe7c
@@ -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,
|
||||
});
|
||||
Reference in New Issue
Block a user