Skip to content

Commit 13df73a

Browse files
committed
add api documentation
1 parent 25999c2 commit 13df73a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/msal-node/src/client/PublicClientApplication.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ export class PublicClientApplication extends ClientApplication implements IPubli
8787
}
8888

8989
/**
90-
* Acquires a token by requesting an Authorization code then exchanging it for a token.
90+
* Acquires a token interactively via the browser by requesting an authorization code then exchanging it for a token.
9191
*/
92-
async acquireTokenInteractive(request: InteractiveRequest): Promise<AuthenticationResult> {
92+
public async acquireTokenInteractive(request: InteractiveRequest): Promise<AuthenticationResult> {
9393
const { verifier, challenge } = await this.cryptoProvider.generatePkceCodes();
9494
const { openBrowser, successTemplate, errorTemplate, loopbackClient: customLoopbackClient, ...remainingProperties } = request;
9595

lib/msal-node/src/request/InteractiveRequest.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66
import { ILoopbackClient } from "../network/ILoopbackClient";
77
import { AuthorizationUrlRequest } from "./AuthorizationUrlRequest";
88

9+
/**
10+
* Request object passed by user to configure acquireTokenInteractive API
11+
*
12+
* - openBrowser - Function to open a browser instance on user's system.
13+
* - scopes - Array of scopes the application is requesting access to.
14+
* - successTemplate: - Template to be displayed on the opened browser instance upon successful token acquisition.
15+
* - errorTemplate - Template to be displayed on the opened browser instance upon token acquisition failure.
16+
* - loopbackClient - Custom implementation for a loopback server to listen for authorization code response.
17+
* @public
18+
*/
919
export type InteractiveRequest = Pick<AuthorizationUrlRequest, "authority"|"correlationId"|"claims"|"azureCloudOptions"|"account"|"extraQueryParameters"|"tokenQueryParameters"|"extraScopesToConsent"|"loginHint"|"prompt"> & {
1020
openBrowser: (url: string) => Promise<void>;
1121
scopes?: Array<string>;

0 commit comments

Comments
 (0)