-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
Checkin distributables, generate docs
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,9 +104,3 @@ typings/ | |
|
||
# e2e test screenshots | ||
screenshots/ | ||
|
||
# distributables | ||
dist/ | ||
|
||
# documentation | ||
docs/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Configuration } from "@azure/msal-node"; | ||
import { AuthConfig, AppType, ProtectedResourcesMap } from "./ConfigurationTypes"; | ||
export declare class ConfigurationHelper { | ||
/** | ||
* Maps the custom configuration object to configuration | ||
* object expected by MSAL Node ConfidentialClientApplication class | ||
* @param {AuthConfig} authConfig: configuration object | ||
* @returns {Configuration} | ||
*/ | ||
static getMsalConfiguration(authConfig: AuthConfig): Configuration; | ||
/** | ||
* Validates the fields in the config object | ||
* @param {AuthConfig} authConfig: configuration object | ||
* @param {AppType} appType: type of application | ||
*/ | ||
static validateAuthConfig(authConfig: AuthConfig, appType: AppType): void; | ||
/** | ||
* Indicates whether the given authority is a B2C authority | ||
* @param authority | ||
* @returns | ||
*/ | ||
static isB2CAuthority(authority: string): boolean; | ||
/** | ||
* Returns the tenantId associated with the authority string | ||
* @param {string} authority: authority string | ||
* @returns {string} | ||
*/ | ||
static getTenantIdFromAuthority(authority: string): string; | ||
/** | ||
* Returns the instance associated with the authority string | ||
* @param {string} authority: authority string | ||
* @returns {string} | ||
*/ | ||
static getInstanceFromAuthority(authority: string): string; | ||
/** | ||
* Util method to get the resource name for a given scope(s) | ||
* @param {Array} scopes: an array of scopes from the token response | ||
* @param {ProtectedResourcesMap} protectedResources: application authentication parameters | ||
* @returns {string} | ||
*/ | ||
static getResourceNameFromScopes(scopes: string[], protectedResources: ProtectedResourcesMap): string; | ||
/** | ||
* Util method to strip the default OIDC scopes from a given scopes list | ||
* @param {Array} scopesList: full list of scopes for this resource | ||
* @returns {Array} | ||
*/ | ||
static getEffectiveScopes(scopesList: string[]): string[]; | ||
/** | ||
* Verifies if a given string is GUID | ||
* @param {string} guid: string to be verified as GUID | ||
* @returns {boolean} | ||
*/ | ||
static isGuid(guid: string): boolean; | ||
} | ||
//# sourceMappingURL=ConfigurationHelper.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { NodeAuthOptions, NodeSystemOptions, CacheOptions } from "@azure/msal-node"; | ||
export type AuthConfig = { | ||
auth: Omit<NodeAuthOptions, "azureCloudOptions" | "clientAssertion">; | ||
system?: NodeSystemOptions; | ||
cache?: CacheOptions; | ||
}; | ||
export type WebAppAuthConfig = AuthConfig & { | ||
auth: NodeAuthOptions & AuthRoutes; | ||
}; | ||
export type AuthRoutes = { | ||
redirectUri: string; | ||
frontChannelLogoutUri?: string; | ||
postLogoutRedirectUri?: string; | ||
}; | ||
export type ProtectedResourcesMap = Record<string, ProtectedResourceParams>; | ||
export type ProtectedResourceParams = { | ||
scopes: Array<string>; | ||
routes: Array<string>; | ||
}; | ||
export declare enum AppType { | ||
WebApp = 0 | ||
} | ||
//# sourceMappingURL=ConfigurationTypes.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.