lakutata
Version:
An IoC-based universal application framework.
134 lines (125 loc) • 4.14 kB
TypeScript
interface DefaultAuthentication {
type: "default";
options: {
/**
* User name to use for sql server login.
*/
userName?: string;
/**
* Password to use for sql server login.
*/
password?: string;
};
}
interface AzureActiveDirectoryAccessTokenAuthentication {
type: "azure-active-directory-access-token";
options: {
/**
* A user need to provide `token` which they retrieved else where
* to forming the connection.
*/
token: string;
};
}
interface AzureActiveDirectoryDefaultAuthentication {
/**
* This uses DefaultAzureCredential from @azure/identity to try multiple methods of authentication
*/
type: "azure-active-directory-default";
options: {
/**
* The clientId of the user you want to log in with, mapped to the managedIdentityClientId in tedious
*/
clientId?: string;
};
}
interface AzureActiveDirectoryMsiAppServiceAuthentication {
type: "azure-active-directory-msi-app-service";
options: {
/**
* If you user want to connect to an Azure app service using a specific client account
* they need to provide `clientId` associate to their created identity.
*
* This is optional for retrieve token from azure web app service
*/
clientId?: string;
/**
* A msi app service environment need to provide `msiEndpoint` for retriving the accesstoken.
*/
msiEndpoint?: string;
/**
* A msi app service environment need to provide `msiSecret` for retrieved the accesstoken.
*/
msiSecret?: string;
};
}
interface AzureActiveDirectoryMsiVmAuthentication {
type: "azure-active-directory-msi-vm";
options: {
/**
* If you user want to connect to an Azure app service using a specific client account
* they need to provide `clientId` associate to their created identity.
*
* This is optional for retrieve token from azure web app service
*/
clientId?: string;
/**
* A user need to provide `msiEndpoint` for retrieving the accesstoken.
*/
msiEndpoint?: string;
};
}
interface AzureActiveDirectoryPasswordAuthentication {
type: "azure-active-directory-password";
options: {
/**
* A user need to provide `userName` associate to their account.
*/
userName: string;
/**
* A user need to provide `password` associate to their account.
*/
password: string;
/**
* Optional parameter for specific Azure tenant ID
*/
domain: string;
};
}
interface AzureActiveDirectoryServicePrincipalSecret {
type: "azure-active-directory-service-principal-secret";
options: {
/**
* Application (`client`) ID from your registered Azure application
*/
clientId: string;
/**
* The created `client secret` for this registered Azure application
*/
clientSecret: string;
/**
* Directory (`tenant`) ID from your registered Azure application
*/
tenantId: string;
};
}
interface NtlmAuthentication {
type: "ntlm";
options: {
/**
* User name from your windows account.
*/
userName: string;
/**
* Password from your windows account.
*/
password: string;
/**
* Once you set domain for ntlm authentication type, driver will connect to SQL Server using domain login.
*
* This is necessary for forming a connection using ntlm type
*/
domain: string;
};
}
export type { AzureActiveDirectoryAccessTokenAuthentication, AzureActiveDirectoryDefaultAuthentication, AzureActiveDirectoryMsiAppServiceAuthentication, AzureActiveDirectoryMsiVmAuthentication, AzureActiveDirectoryPasswordAuthentication, AzureActiveDirectoryServicePrincipalSecret, DefaultAuthentication, NtlmAuthentication };