@azure/msal-common
Advanced tools
Comparing version 1.0.0-beta.0 to 1.0.0-beta.1
@@ -0,1 +1,14 @@ | ||
# 1.0.0-beta.1 | ||
- Fixed an issue where types are not exported correctly (#1517) | ||
- Logger class is now exported (#1486) | ||
- Added knownAuthorities to support B2C authorities (#1416) | ||
- Refactored authority classes for B2C use cases (#1424) | ||
- Synced all classes and objects to work for both @azure/msal-browser and @azure/msal-node (#1552) | ||
- Merged configuration for node and browser classes (#1575) | ||
- Fixed issue with caching for multiple resources (#1553) | ||
- Adding support for node classes | ||
- Refresh token client (#1496) | ||
- Device code client (#1550, #1434) | ||
- Authorization Code Client (#1434) | ||
# 1.0.0-beta.0 | ||
@@ -2,0 +15,0 @@ - Fully functioning project completed |
import { AccessTokenCacheItem } from "./AccessTokenCacheItem"; | ||
import { ICacheStorage } from "./ICacheStorage"; | ||
import { Account } from "../auth/Account"; | ||
import { Authority } from "../auth/authority/Authority"; | ||
import { Account } from "../account/Account"; | ||
import { Authority } from "../authority/Authority"; | ||
import { ServerCodeRequestParameters } from "../server/ServerCodeRequestParameters"; | ||
@@ -6,0 +6,0 @@ /** |
import { AuthError } from "./AuthError"; | ||
import { IdToken } from "../auth/IdToken"; | ||
import { ScopeSet } from "../auth/ScopeSet"; | ||
import { IdToken } from "../account/IdToken"; | ||
import { ScopeSet } from "../request/ScopeSet"; | ||
/** | ||
@@ -96,2 +96,10 @@ * ClientAuthErrorMessage class containing string constants used by error codes and messages. | ||
}; | ||
DeviceCodePollingCancelled: { | ||
code: string; | ||
desc: string; | ||
}; | ||
DeviceCodeExpired: { | ||
code: string; | ||
desc: string; | ||
}; | ||
}; | ||
@@ -200,2 +208,10 @@ /** | ||
static createEmptyInputScopeSetError(givenScopeSet: ScopeSet): ClientAuthError; | ||
/** | ||
* Throws error if user sets CancellationToken.cancel = true during polling of token endpoint during device code flow | ||
*/ | ||
static createDeviceCodeCancelledError(): ClientAuthError; | ||
/** | ||
* Throws error if device code is expired | ||
*/ | ||
static createDeviceCodeExpiredError(): ClientAuthError; | ||
} |
@@ -50,2 +50,18 @@ import { ClientAuthError } from "./ClientAuthError"; | ||
}; | ||
invalidCodeChallengeMethod: { | ||
code: string; | ||
desc: string; | ||
}; | ||
invalidCodeChallengeParams: { | ||
code: string; | ||
desc: string; | ||
}; | ||
b2cKnownAuthoritiesNotSet: { | ||
code: string; | ||
desc: string; | ||
}; | ||
untrustedAuthority: { | ||
code: string; | ||
desc: string; | ||
}; | ||
}; | ||
@@ -108,2 +124,18 @@ /** | ||
static createEmptyTokenRequestError(): ClientConfigurationError; | ||
/** | ||
* Throws error when an invalid code_challenge_method is passed by the user | ||
*/ | ||
static createInvalidCodeChallengeMethodError(): ClientConfigurationError; | ||
/** | ||
* Throws error when both params: code_challenge and code_challenge_method are not passed together | ||
*/ | ||
static createInvalidCodeChallengeParamsError(): ClientConfigurationError; | ||
/** | ||
* Throws an error when the user passes B2C authority and does not set knownAuthorities | ||
*/ | ||
static createKnownAuthoritiesNotSetError(): ClientConfigurationError; | ||
/** | ||
* Throws error when provided authority is not a member of the trusted host list | ||
*/ | ||
static createUntrustedAuthorityError(): ClientConfigurationError; | ||
} |
@@ -1,10 +0,14 @@ | ||
export { AuthorizationCodeModule } from "./app/module/AuthorizationCodeModule"; | ||
export { PublicClientSPAConfiguration, AuthOptions } from "./app/config/PublicClientSPAConfiguration"; | ||
export { SystemOptions, LoggerOptions, TelemetryOptions } from "./app/config/ModuleConfiguration"; | ||
export { Account } from "./auth/Account"; | ||
export { IdTokenClaims } from "./auth/IdTokenClaims"; | ||
export { Authority } from "./auth/authority/Authority"; | ||
export { AuthorityFactory } from "./auth/authority/AuthorityFactory"; | ||
export { SPAClient } from "./client/SPAClient"; | ||
export { AuthorizationCodeClient } from "./client/AuthorizationCodeClient"; | ||
export { DeviceCodeClient } from "./client/DeviceCodeClient"; | ||
export { RefreshTokenClient } from "./client/RefreshTokenClient"; | ||
export { AuthOptions, SystemOptions, LoggerOptions, TelemetryOptions } from "./config/ClientConfiguration"; | ||
export { ClientConfiguration } from "./config/ClientConfiguration"; | ||
export { Account } from "./account/Account"; | ||
export { IdTokenClaims } from "./account/IdTokenClaims"; | ||
export { Authority } from "./authority/Authority"; | ||
export { AuthorityFactory } from "./authority/AuthorityFactory"; | ||
export { ICacheStorage } from "./cache/ICacheStorage"; | ||
export { INetworkModule, NetworkRequestOptions } from "./network/INetworkModule"; | ||
export { NetworkResponse } from "./network/NetworkManager"; | ||
export { IUri } from "./url/IUri"; | ||
@@ -14,2 +18,6 @@ export { UrlString } from "./url/UrlString"; | ||
export { AuthenticationParameters } from "./request/AuthenticationParameters"; | ||
export { AuthorizationCodeUrlRequest } from "./request/AuthorizationCodeUrlRequest"; | ||
export { AuthorizationCodeRequest } from "./request/AuthorizationCodeRequest"; | ||
export { RefreshTokenRequest } from "./request/RefreshTokenRequest"; | ||
export { AuthenticationResult } from "./response/AuthenticationResult"; | ||
export { TokenExchangeParameters } from "./request/TokenExchangeParameters"; | ||
@@ -20,3 +28,5 @@ export { TokenRenewParameters } from "./request/TokenRenewParameters"; | ||
export { CodeResponse } from "./response/CodeResponse"; | ||
export { ILoggerCallback, LogLevel } from "./logger/Logger"; | ||
export { DeviceCodeRequest } from "./request/DeviceCodeRequest"; | ||
export { ILoggerCallback, LogLevel, Logger } from "./logger/Logger"; | ||
export { InteractionRequiredAuthError } from "./error/InteractionRequiredAuthError"; | ||
export { AuthError, AuthErrorMessage } from "./error/AuthError"; | ||
@@ -26,3 +36,3 @@ export { ServerError } from "./error/ServerError"; | ||
export { ClientConfigurationError, ClientConfigurationErrorMessage } from "./error/ClientConfigurationError"; | ||
export { Constants, TemporaryCacheKeys, PersistentCacheKeys } from "./utils/Constants"; | ||
export { Constants, PromptValue, TemporaryCacheKeys, PersistentCacheKeys } from "./utils/Constants"; | ||
export { StringUtils } from "./utils/StringUtils"; |
@@ -1,2 +0,2 @@ | ||
import { LoggerOptions } from "../app/config/ModuleConfiguration.js"; | ||
import { LoggerOptions } from "../config/ClientConfiguration"; | ||
/** | ||
@@ -9,2 +9,3 @@ * Options for logger messages. | ||
containsPii?: boolean; | ||
context?: string; | ||
}; | ||
@@ -11,0 +12,0 @@ /** |
@@ -0,1 +1,2 @@ | ||
import { NetworkResponse } from "./NetworkManager"; | ||
/** | ||
@@ -19,3 +20,3 @@ * Options allowed by network request APIs. | ||
*/ | ||
sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<T>; | ||
sendGetRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>; | ||
/** | ||
@@ -27,3 +28,3 @@ * Interface function for async network "POST" requests. Based on the Fetch standard: https://fetch.spec.whatwg.org/ | ||
*/ | ||
sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<T>; | ||
sendPostRequestAsync<T>(url: string, options?: NetworkRequestOptions): Promise<NetworkResponse<T>>; | ||
} |
import { ClientRequestParameters } from "./ClientRequestParameters"; | ||
import { Account } from "../auth/Account"; | ||
import { Account } from "../account/Account"; | ||
/** | ||
@@ -21,3 +21,2 @@ * AuthenticationParameters passed by user to retrieve a token from the server. | ||
prompt?: string; | ||
claimsRequest?: string; | ||
userRequestState?: string; | ||
@@ -28,6 +27,1 @@ account?: Account; | ||
}; | ||
/** | ||
* Function which validates claims request passed in by the user. | ||
* @param request | ||
*/ | ||
export declare function validateClaimsRequest(request: AuthenticationParameters): void; |
import { ClientRequestParameters } from "./ClientRequestParameters"; | ||
import { Account } from "../auth/Account"; | ||
import { Account } from "../account/Account"; | ||
/** | ||
@@ -11,2 +11,4 @@ * AuthenticationParameters passed by user to retrieve a token from the server. | ||
* - account: Account object to perform SSO | ||
* - sid: session id for SSO | ||
* - loginHint: login hint for SSO | ||
* - forceRefresh: Forces silent requests to make network calls if true | ||
@@ -16,3 +18,5 @@ */ | ||
account?: Account; | ||
sid?: string; | ||
loginHint?: string; | ||
forceRefresh?: boolean; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { IdToken } from "../auth/IdToken"; | ||
import { IdToken } from "../account/IdToken"; | ||
import { CacheHelpers } from "../cache/CacheHelpers"; | ||
@@ -3,0 +3,0 @@ import { ServerAuthorizationTokenResponse } from "../server/ServerAuthorizationTokenResponse"; |
import { AuthResponse } from "./AuthResponse"; | ||
import { Account } from "../auth/Account"; | ||
import { Account } from "../account/Account"; | ||
import { StringDict } from "../utils/MsalTypes"; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,6 +0,6 @@ | ||
import { Authority } from "../auth/authority/Authority"; | ||
import { Account } from "../auth/Account"; | ||
import { Authority } from "../authority/Authority"; | ||
import { Account } from "../account/Account"; | ||
import { ICrypto, PkceCodes } from "../crypto/ICrypto"; | ||
import { ScopeSet } from "../auth/ScopeSet"; | ||
import { IdToken } from "../auth/IdToken"; | ||
import { ScopeSet } from "../request/ScopeSet"; | ||
import { IdToken } from "../account/IdToken"; | ||
import { AuthenticationParameters } from "../request/AuthenticationParameters"; | ||
@@ -7,0 +7,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { ScopeSet } from "../auth/ScopeSet"; | ||
import { ScopeSet } from "../request/ScopeSet"; | ||
import { TokenExchangeParameters } from "../request/TokenExchangeParameters"; | ||
@@ -3,0 +3,0 @@ import { CodeResponse } from "../response/CodeResponse"; |
export declare const Constants: { | ||
LIBRARY_NAME: string; | ||
SKU: string; | ||
CACHE_PREFIX: string; | ||
DEFAULT_AUTHORITY: string; | ||
ADFS: string; | ||
AAD_INSTANCE_DISCOVERY_ENDPT: string; | ||
DEVICE_CODE_ENDPOINT_PATH: string; | ||
RESOURCE_DELIM: string; | ||
@@ -17,4 +20,6 @@ NO_ACCOUNT: string; | ||
FRAGMENT_RESPONSE_MODE: string; | ||
QUERY_RESPONSE_MODE: string; | ||
S256_CODE_CHALLENGE_METHOD: string; | ||
URL_FORM_CONTENT_TYPE: string; | ||
AUTHORIZATION_PENDING: string; | ||
}; | ||
@@ -24,3 +29,3 @@ /** | ||
*/ | ||
export declare enum HEADER_NAMES { | ||
export declare enum HeaderNames { | ||
CONTENT_TYPE = "Content-Type" | ||
@@ -94,4 +99,7 @@ } | ||
X_CLIENT_SKU = "x-client-SKU", | ||
X_CLIENT_VER = "x-client-Ver", | ||
POST_LOGOUT_URI = "post_logout_redirect_uri" | ||
X_CLIENT_VER = "x-client-VER", | ||
X_CLIENT_OS = "x-client-OS", | ||
X_CLIENT_CPU = "x-client-CPU", | ||
POST_LOGOUT_URI = "post_logout_redirect_uri", | ||
DEVICE_CODE = "device_code" | ||
} | ||
@@ -144,1 +152,31 @@ /** | ||
export declare const BlacklistedEQParams: SSOTypes[]; | ||
/** | ||
* allowed values for codeVerifier | ||
*/ | ||
export declare const CodeChallengeMethodValues: { | ||
PLAIN: string; | ||
S256: string; | ||
}; | ||
/** | ||
* | ||
*/ | ||
export declare const CodeChallengeMethodValuesArray: string[]; | ||
/** | ||
* allowed values for response_mode | ||
*/ | ||
export declare enum ResponseMode { | ||
QUERY = "query", | ||
FRAGMENT = "fragment", | ||
FORM_POST = "form_post" | ||
} | ||
/** | ||
* allowed grant_type | ||
*/ | ||
export declare enum GrantType { | ||
IMPLICIT_GRANT = "implicit", | ||
AUTHORIZATION_CODE_GRANT = "authorization_code", | ||
CLIENT_CREDENTIALS_GRANT = "client_credentials", | ||
RESOURCE_OWNER_PASSWORD_GRANT = "password", | ||
REFRESH_TOKEN_GRANT = "refresh_token", | ||
DEVICE_CODE_GRANT = "device_code" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { DecodedJwt } from "../auth/DecodedJwt"; | ||
import { DecodedJwt } from "../account/DecodedJwt"; | ||
/** | ||
@@ -3,0 +3,0 @@ * @hidden |
@@ -13,3 +13,3 @@ { | ||
}, | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0-beta.1", | ||
"description": "Microsoft Authentication Library for js", | ||
@@ -67,2 +67,3 @@ "keywords": [ | ||
"@types/chai-as-promised": "^7.1.2", | ||
"@types/debug": "^4.1.5", | ||
"@types/mocha": "^5.2.7", | ||
@@ -83,3 +84,3 @@ "@types/sinon": "^7.5.0", | ||
"rollup-plugin-typescript2": "^0.24.3", | ||
"rollup-plugin-uglify": "^6.0.3", | ||
"rollup-plugin-uglify": "^6.0.4", | ||
"shx": "^0.3.2", | ||
@@ -89,5 +90,7 @@ "sinon": "^7.5.0", | ||
"tslint": "^5.20.0", | ||
"typescript": "^3.6.4" | ||
"typescript": "^3.7.5" | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
"debug": "^4.1.1" | ||
} | ||
} |
@@ -8,3 +8,3 @@ # (Preview) Microsoft Authentication Library for JavaScript (MSAL.js) Common Package | ||
1. [About](#about) | ||
2. [FAQ](./FAQ.md) | ||
2. [FAQ](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md) | ||
3. [Releases](#releases) | ||
@@ -26,3 +26,3 @@ 4. [Prerequisites](#prerequisites) | ||
See [here](./FAQ.md). | ||
See [here](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-common/FAQ.md). | ||
@@ -41,3 +41,3 @@ ## Releases | ||
- [MSAL for Single Page Applications (SPAs)](../msal-browser/README.md) | ||
- [MSAL for Single Page Applications (SPAs)](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-browser) | ||
@@ -44,0 +44,0 @@ ## Installation |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1161891
66
13107
1
33
+ Addeddebug@^4.1.1
+ Addeddebug@4.3.7(transitive)
+ Addedms@2.1.3(transitive)