@azure/msal-node package
Classes
NodeStorage |
This class implements Storage for node, reading cache from user specified storage location or an extension library |
TokenCache |
In-memory token cache manager |
DistributedCachePlugin | |
Deserializer |
This class deserializes cache entities read from the file into in memory object types defined internally |
Serializer | |
ClientApplication |
Base abstract class for all ClientApplications - public and confidential |
ClientAssertion |
Client assertion of type jwt-bearer used in confidential client flows |
ConfidentialClientApplication |
This class is to be used to acquire tokens for confidential client applications (webApp, webAPI). Confidential client applications will configure application secrets, client certificates/assertions as applicable |
PublicClientApplication |
This class is to be used to acquire tokens for public client applications (desktop, mobile). Public client applications are not trusted to safely store application secrets, and therefore can only request tokens in the name of an user. |
CryptoProvider |
This class implements MSAL node's crypto interface, which allows it to perform base64 encoding and decoding, generating cryptographically random GUIDs and implementing Proof Key for Code Exchange specs for the OAuth Authorization Code Flow using PKCE (rfc here: https://tools.ietf.org/html/rfc7636). |
GuidGenerator | |
HashUtils | |
PkceGenerator | |
NodeAuthError | |
HttpClient |
This class implements the API for network requests. |
LoopbackClient | |
EncodingUtils | |
NetworkUtils |
Interfaces
ITokenCache |
Token cache interface for the client, giving access to cache APIs |
ICacheClient | |
IPartitionManager | |
IConfidentialClientApplication |
Interface for the ConfidentialClientApplication class defining the public API signatures |
IPublicClientApplication |
Interface for the PublicClientApplication class defining the public API signatures |
Type Aliases
CacheKVStore |
Key value store for in-memory cache |
InMemoryCache |
Intermittent type to handle in-memory data objects with defined types |
JsonCache |
Cache format read from the cache blob provided to the configuration during app instantiation |
SerializedAccessTokenEntity |
Access token credential type |
SerializedAccountEntity |
Account type |
SerializedAppMetadataEntity |
AppMetadata type |
SerializedIdTokenEntity |
Idtoken credential type |
SerializedRefreshTokenEntity |
Refresh token credential type |
CacheOptions |
Use this to configure the below cache configuration options:
|
Configuration |
Use the configuration object to configure MSAL and initialize the client application object
|
NodeAuthOptions |
|
NodeConfiguration | |
NodeSystemOptions |
Type for configuring logger and http client options
|
NodeTelemetryOptions | |
AuthorizationCodeRequest |
Request object passed by user to acquire a token from the server exchanging a valid authorization code (second leg of OAuth2.0 Authorization Code flow)
|
AuthorizationUrlRequest |
Request object passed by user to retrieve a Code from the server (first leg of authorization code grant flow)
|
ClientCredentialRequest |
CommonClientCredentialRequest
|
DeviceCodeRequest |
Parameters for Oauth2 device code flow.
|
InteractiveRequest | |
OnBehalfOfRequest |
|
RefreshTokenRequest |
CommonRefreshTokenRequest
|
SilentFlowRequest |
SilentFlow parameters passed by the user to retrieve credentials silently
|
UsernamePasswordRequest |
UsernamePassword parameters passed by the user to retrieve credentials Note: The latest OAuth 2.0 Security Best Current Practice disallows the password grant entirely. This flow is added for internal testing.
|
Enums
ApiId |
API Codes for Telemetry purposes. Before adding a new code you must claim it in the MSAL Telemetry tracker as these number spaces are shared across all MSALs 0-99 Silent Flow 600-699 Device Code Flow 800-899 Auth Code Flow |
HttpMethod |
http methods |
HttpStatus | |
ProxyStatus |
Functions
Function Details
buildAppConfiguration({ auth: { authority?: string, authorityMetadata?: string, azureCloudOptions?: AzureCloudOptions, clientAssertion?: string, clientCapabilities?: Array<string>, clientCertificate?: { privateKey: string, thumbprint: string, x5c?: string }, clientId: string, clientSecret?: string, cloudDiscoveryMetadata?: string, knownAuthorities?: Array<string>, protocolMode?: ProtocolMode, skipAuthorityMetadataCache?: boolean }, cache: { cachePlugin?: ICachePlugin }, system: { loggerOptions?: LoggerOptions, networkClient?: INetworkModule, proxyUrl?: string }, telemetry: { application?: ApplicationTelemetry } })
Sets the default options when not explicitly configured from app developer
function buildAppConfiguration(__namedParameters: { auth: { authority?: string, authorityMetadata?: string, azureCloudOptions?: AzureCloudOptions, clientAssertion?: string, clientCapabilities?: Array<string>, clientCertificate?: { privateKey: string, thumbprint: string, x5c?: string }, clientId: string, clientSecret?: string, cloudDiscoveryMetadata?: string, knownAuthorities?: Array<string>, protocolMode?: ProtocolMode, skipAuthorityMetadataCache?: boolean }, cache: { cachePlugin?: ICachePlugin }, system: { loggerOptions?: LoggerOptions, networkClient?: INetworkModule, proxyUrl?: string }, telemetry: { application?: ApplicationTelemetry } }): NodeConfiguration
Parameters
- __namedParameters
-
{ auth: { authority?: string, authorityMetadata?: string, azureCloudOptions?: AzureCloudOptions, clientAssertion?: string, clientCapabilities?: Array<string>, clientCertificate?: { privateKey: string, thumbprint: string, x5c?: string }, clientId: string, clientSecret?: string, cloudDiscoveryMetadata?: string, knownAuthorities?: Array<string>, protocolMode?: ProtocolMode, skipAuthorityMetadataCache?: boolean }, cache: { cachePlugin?: ICachePlugin }, system: { loggerOptions?: LoggerOptions, networkClient?: INetworkModule, proxyUrl?: string }, telemetry: { application?: ApplicationTelemetry } }
Returns
Configuration