Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "major",
"comment": "Adjust injection token constants to support typed injection",
"packageName": "@azure/msal-angular",
"email": "[email protected]",
"dependentChangeType": "patch"
}
20 changes: 12 additions & 8 deletions lib/msal-angular/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,21 @@
*/

import { InjectionToken } from "@angular/core";
import { type IPublicClientApplication } from "@azure/msal-browser";
import { type MsalBroadcastConfiguration } from "./msal.broadcast.config";
import { type MsalGuardConfiguration } from "./msal.guard.config";
import { type MsalInterceptorConfiguration } from "./msal.interceptor.config";

export const MSAL_INSTANCE = new InjectionToken<string>("MSAL_INSTANCE");
export const MSAL_INSTANCE = new InjectionToken<IPublicClientApplication>(
"MSAL_INSTANCE"
);

export const MSAL_GUARD_CONFIG = new InjectionToken<string>(
export const MSAL_GUARD_CONFIG = new InjectionToken<MsalGuardConfiguration>(
"MSAL_GUARD_CONFIG"
);

export const MSAL_INTERCEPTOR_CONFIG = new InjectionToken<string>(
"MSAL_INTERCEPTOR_CONFIG"
);
export const MSAL_INTERCEPTOR_CONFIG =
new InjectionToken<MsalInterceptorConfiguration>("MSAL_INTERCEPTOR_CONFIG");

export const MSAL_BROADCAST_CONFIG = new InjectionToken<string>(
"MSAL_BROADCAST_CONFIG"
);
export const MSAL_BROADCAST_CONFIG =
new InjectionToken<MsalBroadcastConfiguration>("MSAL_BROADCAST_CONFIG");