Skip to content

Commit a44bc9c

Browse files
committed
api view
1 parent 38b859c commit a44bc9c

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

sdk/postgresql/postgresql-auth/review/postgresql-auth-node.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import type { TokenCredential } from '@azure/core-auth';
88

99
// @public
10-
export function configureEntraAuthentication(sequelizeInstance: SequelizeBeforeConnectHook, credential: TokenCredential, options?: ConfigureEntraIdAuthOptions): typeof sequelizeInstance;
10+
export function configureEntraAuthentication(sequelizeInstance: SequelizeBeforeConnectHook, credential: TokenCredential, options?: ConfigureEntraAuthenticationOptions): typeof sequelizeInstance;
1111

1212
// @public
13-
export interface ConfigureEntraIdAuthOptions {
13+
export interface ConfigureEntraAuthenticationOptions {
1414
fallbackUsername?: string;
1515
}
1616

@@ -19,7 +19,7 @@ export function entraTokenProvider(credential: TokenCredential, options?: GetEnt
1919

2020
// @public
2121
export interface GetEntraTokenPasswordOptions {
22-
scope?: string;
22+
scope?: string | string[];
2323
}
2424

2525
// @public

sdk/postgresql/postgresql-auth/src/entraConnection.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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 {
123123
export 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
*/
182182
export 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");

sdk/postgresql/postgresql-auth/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313
export { configureEntraAuthentication, entraTokenProvider } from "./entraConnection.js";
1414
export type {
15-
ConfigureEntraIdAuthOptions,
16-
GetEntraTokenPasswordOptions,
15+
ConfigureEntraAuthenticationOptions,
16+
GetEntraAccessTokenOptions as GetEntraTokenPasswordOptions,
1717
SequelizeBeforeConnectHook,
1818
} from "./entraConnection.js";

0 commit comments

Comments
 (0)