UNPKG

botframework-connector

Version:

Bot Connector is autorest generated connector client.

170 lines 7.74 kB
"use strict"; /** * @module botframework-connector */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.AuthenticationConstants = void 0; // eslint-disable-next-line @typescript-eslint/no-namespace var AuthenticationConstants; (function (AuthenticationConstants) { /** * TO CHANNEL FROM BOT: Login URL * * DEPRECATED: DO NOT USE */ AuthenticationConstants.ToChannelFromBotLoginUrl = 'https://login.microsoftonline.com/botframework.com'; /** * TO CHANNEL FROM BOT: Login URL prefix */ AuthenticationConstants.ToChannelFromBotLoginUrlPrefix = 'https://login.microsoftonline.com/'; /** * TO CHANNEL FROM BOT: Login URL token endpoint path */ AuthenticationConstants.ToChannelFromBotTokenEndpointPath = '/oauth2/v2.0/token'; /** * TO CHANNEL FROM BOT: Default tenant from which to obtain a token for bot to channel communication */ AuthenticationConstants.DefaultChannelAuthTenant = 'botframework.com'; /** * TO CHANNEL FROM BOT: OAuth scope to request */ AuthenticationConstants.ToChannelFromBotOAuthScope = 'https://api.botframework.com'; /** * TO BOT FROM CHANNEL: Token issuer */ AuthenticationConstants.ToBotFromChannelTokenIssuer = 'https://api.botframework.com'; /** * OAuth Url used to get a token from OAuthApiClient. */ AuthenticationConstants.OAuthUrl = 'https://api.botframework.com'; /** * Application Setting Key for the OpenIdMetadataUrl value. */ AuthenticationConstants.BotOpenIdMetadataKey = 'BotOpenIdMetadata'; /** * Application Setting Key for the ChannelService value. */ AuthenticationConstants.ChannelService = 'ChannelService'; /** * Application Setting Key for the OAuthUrl value. */ AuthenticationConstants.OAuthUrlKey = 'OAuthApiEndpoint'; /** * Application Settings Key for whether to emulate OAuthCards when using the emulator. */ AuthenticationConstants.EmulateOAuthCardsKey = 'EmulateOAuthCards'; /** * TO BOT FROM CHANNEL: OpenID metadata document for tokens coming from MSA */ AuthenticationConstants.ToBotFromChannelOpenIdMetadataUrl = 'https://login.botframework.com/v1/.well-known/openidconfiguration'; /** * TO BOT FROM ENTERPRISE CHANNEL: OpenID metadata document for tokens coming from MSA */ AuthenticationConstants.ToBotFromEnterpriseChannelOpenIdMetadataUrlFormat = 'https://{channelService}.enterprisechannel.botframework.com/v1/.well-known/openidconfiguration'; /** * TO BOT FROM EMULATOR: OpenID metadata document for tokens coming from MSA */ AuthenticationConstants.ToBotFromEmulatorOpenIdMetadataUrl = 'https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration'; /** * The V1 Azure AD token issuer URL template that will contain the tenant id where the token was issued from. */ AuthenticationConstants.ValidTokenIssuerUrlTemplateV1 = 'https://sts.windows.net/'; /** * The V2 Azure AD token issuer URL template that will contain the tenant id where the token was issued from. */ AuthenticationConstants.ValidTokenIssuerUrlTemplateV2 = 'https://login.microsoftonline.com/'; /** * The Government V1 Azure AD token issuer URL template that will contain the tenant id where the token was issued from. */ AuthenticationConstants.ValidGovernmentTokenIssuerUrlTemplateV1 = 'https://login.microsoftonline.us/'; /** * The Government V2 Azure AD token issuer URL template that will contain the tenant id where the token was issued from. */ AuthenticationConstants.ValidGovernmentTokenIssuerUrlTemplateV2 = 'https://login.microsoftonline.us/'; /** * Allowed token signing algorithms. Tokens come from channels to the bot. The code * that uses this also supports tokens coming from the emulator. */ AuthenticationConstants.AllowedSigningAlgorithms = ['RS256', 'RS384', 'RS512']; /** * 'azp' Claim. * Authorized party - the party to which the ID Token was issued. * This claim follows the general format set forth in the OpenID Spec. * http://openid.net/specs/openid-connect-core-1_0.html#IDToken */ AuthenticationConstants.AuthorizedParty = 'azp'; /** * Audience Claim. From RFC 7519. * https://tools.ietf.org/html/rfc7519#section-4.1.3 * The 'aud' (audience) claim identifies the recipients that the JWT is * intended for. Each principal intended to process the JWT MUST * identify itself with a value in the audience claim.If the principal * processing the claim does not identify itself with a value in the * 'aud' claim when this claim is present, then the JWT MUST be * rejected.In the general case, the 'aud' value is an array of case- * sensitive strings, each containing a StringOrURI value.In the * special case when the JWT has one audience, the 'aud' value MAY be a * single case-sensitive string containing a StringOrURI value.The * interpretation of audience values is generally application specific. * Use of this claim is OPTIONAL. */ AuthenticationConstants.AudienceClaim = 'aud'; /** * Issuer Claim. From RFC 7519. * https://tools.ietf.org/html/rfc7519#section-4.1.1 * The 'iss' (issuer) claim identifies the principal that issued the * JWT. The processing of this claim is generally application specific. * The 'iss' value is a case-sensitive string containing a StringOrURI * value. Use of this claim is OPTIONAL. */ AuthenticationConstants.IssuerClaim = 'iss'; /** * From RFC 7515 * https://tools.ietf.org/html/rfc7515#section-4.1.4 * The 'kid' (key ID) Header Parameter is a hint indicating which key * was used to secure the JWS. This parameter allows originators to * explicitly signal a change of key to recipients. The structure of * the 'kid' value is unspecified. Its value MUST be a case-sensitive * string. Use of this Header Parameter is OPTIONAL. * When used with a JWK, the 'kid' value is used to match a JWK 'kid' * parameter value. */ AuthenticationConstants.KeyIdHeader = 'kid'; /** * Token version claim name. As used in Microsoft AAD tokens. */ AuthenticationConstants.VersionClaim = 'ver'; /** * App ID claim name. As used in Microsoft AAD 1.0 tokens. */ AuthenticationConstants.AppIdClaim = 'appid'; /** * Service URL claim name. As used in Microsoft Bot Framework v3.1 auth. */ AuthenticationConstants.ServiceUrlClaim = 'serviceurl'; /** * Tenant ID claim name. As used in Microsoft AAD tokens. */ AuthenticationConstants.TenantIdClaim = 'tid'; /** * AppId used for creating skill claims when there is no appId and password configured. */ AuthenticationConstants.AnonymousSkillAppId = 'AnonymousSkill'; /** * Indicates that bot identity is anonymous (no appId and password were provided). */ AuthenticationConstants.AnonymousAuthType = 'anonymous'; /** * Certificate thumbprint to authenticate the appId against AAD. */ AuthenticationConstants.CertificateThumbprint = 'CertificateThumbprint'; /** * Certificate key to authenticate the appId against AAD. */ AuthenticationConstants.CertificatePrivateKey = 'CertificatePrivateKey'; })(AuthenticationConstants = exports.AuthenticationConstants || (exports.AuthenticationConstants = {})); //# sourceMappingURL=authenticationConstants.js.map