msal_js library
A wrapper for the msal-browser
(MSAL 2.x) library.
This library expects that msal.js has loaded and exposed the global msal
JavaScript object,
as that is how this library interacts with MSAL. This library will not function if it is
used before the global msal
object is available.
Instantiate a PublicClientApplication to get started.
Classes
- AccountInfo
- An authenticated user account.
- ApiId
- API Codes for Telemetry purposes.
- AuthenticationResult
- Result returned from the authority's token endpoint.
- BrowserAuthOptions
- Used to configure the auth options for a PublicClientApplication.
- BrowserSystemOptions
- Used to configure library specific options for a PublicClientApplication.
- CacheOptions
- Used to configure the cache options for a PublicClientApplication.
- CommonAuthorizationUrlRequest
- CommonEndSessionRequest
- CommonSilentFlowRequest
- Configuration
- Used to configure a PublicClientApplication.
- EndSessionPopupRequest
- EndSessionRequest
- EventMessage
- EventPayload
- An event payload.
- EventType
- Possible event message types.
- INetworkModule
- Client network interface to send backend requests.
- InteractionType
- Interaction type of the API - used for state and telemetry
- Logger
- A logger for an MSAL PublicClientApplication.
- LoggerOptions
- Additional configuration options for a Logger.
-
Additional information passed to the
navigateInternal
andnavigateExternal
functions. - NetworkRequestOptions
- Options allowed by network request APIs.
- NetworkResponse
- PopupRequest
- PublicClientApplication
- The PublicClientApplication class is the object exposed by the library to perform authentication and authorization functions in Single Page Applications to obtain JWT tokens as described in the OAuth 2.0 Authorization Code Flow with PKCE specification.
- RedirectRequest
- SilentRequest
- SsoSilentRequest
Enums
- BrowserCacheLocation
- A browser cache location.
- LogLevel
- The severity of a log message.
Typedefs
- EventCallbackFunction = void Function(EventMessage message)
-
A callback registered with MSAL to intercept event
message
s. - LoggerCallback = void Function(LogLevel level, String message, bool containsPii)
-
A callback for an MSAL log
message
. -
A callback invoked before a redirect flow navigates to the given
url
.
Exceptions / Errors
- AuthException
- General error class thrown by the MSAL.js library.
- BrowserAuthException
- Browser library error class thrown by the MSAL.js library for SPAs.
- BrowserConfigurationAuthException
- Browser library error class thrown by the MSAL.js library for SPAs.
- ClientAuthException
- Thrown when there is an error in the client code running on the browser.
- ClientConfigurationException
- Thrown when there is an error in configuration of the MSAL.js library.
- InteractionRequiredAuthException
- Thrown when user interaction is required at the auth server.
- MsalJsException
- Represents a normal JavaScript Error object thrown by MSAL.js.
- ServerException
- Thrown when there is an error with the server code, for example, unavailability.