@@ -7,18 +7,18 @@ import { logger } from "./logger.js";
77/**
88 * Options for {@link entraTokenProvider}.
99 */
10- export interface GetEntraTokenPasswordOptions {
10+ export interface GetEntraAccessTokenOptions {
1111 /**
1212 * The OAuth scope to request. Defaults to the Azure Database for
1313 * PostgreSQL scope (`https://ossrdbms-aad.database.windows.net/.default`).
1414 */
15- scope ?: string ;
15+ scope ?: string | string [ ] ;
1616}
1717
1818/**
1919 * Options for configuring Entra ID authentication with Sequelize.
2020 */
21- export interface ConfigureEntraIdAuthOptions {
21+ export interface ConfigureEntraAuthenticationOptions {
2222 /**
2323 * Fallback username to use when the access token does not contain a usable `upn` or `appid` claim.
2424 *
@@ -123,7 +123,7 @@ function decodeJwtToken(token: string): DecodedJwtPayload | null {
123123export function configureEntraAuthentication (
124124 sequelizeInstance : SequelizeBeforeConnectHook ,
125125 credential : TokenCredential ,
126- options : ConfigureEntraIdAuthOptions = { } ,
126+ options : ConfigureEntraAuthenticationOptions = { } ,
127127) : typeof sequelizeInstance {
128128 if ( ! credential ) {
129129 throw new Error ( "credential is required" ) ;
@@ -181,7 +181,7 @@ export function configureEntraAuthentication(
181181 */
182182export async function entraTokenProvider (
183183 credential : TokenCredential ,
184- options : GetEntraTokenPasswordOptions = { } ,
184+ options : GetEntraAccessTokenOptions = { } ,
185185) : Promise < string > {
186186 if ( ! credential ) {
187187 throw new Error ( "credential is required" ) ;
0 commit comments