Skip to content

Commit f617b2e

Browse files
committed
add more comments
1 parent 1edab37 commit f617b2e

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

lib/msal-node/src/network/ILoopbackClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
import { ServerAuthorizationCodeResponse } from "@azure/msal-common";
77

8+
/**
9+
* Interface for LoopbackClient allowing to replace the default loopback server with a custom implementation.
10+
* @public
11+
*/
812
export interface ILoopbackClient {
913
listenForAuthCode(successTemplate?: string, errorTemplate?: string): Promise<ServerAuthorizationCodeResponse>,
1014
getRedirectUri(): string,

samples/msal-node-samples/ElectronSystemBrowserTestApp/src/AuthProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ export default class AuthProvider {
112112
tokenRequest: SilentFlowRequest
113113
): Promise<AuthenticationResult> {
114114
try {
115-
// a custom loopback server which can attempt to listen on a preferred port
115+
/**
116+
* A loopback server of your own implementation, which can have custom logic
117+
* such as attempting to listen on a given port if it is available.
118+
*/
116119
const customLoopbackClient = await CustomLoopbackClient.initialize(3874);
117120

118121
// opens a browser instance via Electron shell API

samples/msal-node-samples/ElectronSystemBrowserTestApp/src/CustomLoopbackClient.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { ILoopbackClient } from "@azure/msal-node";
1010
/**
1111
* Implements ILoopbackClient interface to listen for authZ code response.
1212
* This custom implementation checks for a preferred port and uses it if available.
13+
* If the preferred port is not available, it will use a random available port.
1314
*/
1415
export class CustomLoopbackClient implements ILoopbackClient {
1516
port: number = 0; // default port, which will be set to a random available port

0 commit comments

Comments
 (0)