-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add a build specific to token credential support
- Loading branch information
1 parent
3607abc
commit 3856dc5
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { type ConnectionConfiguration } from '../src/connection'; | ||
import { UsernamePasswordCredential } from '@azure/identity'; | ||
|
||
const tokenCredential = new UsernamePasswordCredential( | ||
process.env.AZURE_AD_SP_TENANT_ID as string, | ||
process.env.AZURE_AD_SP_CLIENT_ID as string, | ||
process.env.AZURE_AD_USERNAME as string, | ||
process.env.AZURE_AD_PASSWORD as string | ||
); | ||
|
||
export default { | ||
'server': process.env.AZURE_SERVER, | ||
'authentication': { | ||
'type': 'token-credential', | ||
'options': { | ||
'credential': tokenCredential | ||
} | ||
}, | ||
'options': { | ||
'port': 1433, | ||
'database': 'tedious' | ||
} | ||
} as ConnectionConfiguration; |