UNPKG

557 BPlain TextView Raw
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4import { BotFrameworkAuthentication, ClaimsIdentity } from 'botframework-connector';
5import { ChannelServiceHandlerBase } from './channelServiceHandlerBase';
6
7export class CloudChannelServiceHandler extends ChannelServiceHandlerBase {
8 constructor(private readonly auth: BotFrameworkAuthentication) {
9 super();
10 }
11
12 protected async authenticate(authHeader: string): Promise<ClaimsIdentity> {
13 return this.auth.authenticateChannelRequest(authHeader);
14 }
15}