1
>
/*---------------------------------------------------------------------------------------------
copilotTokenFields.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
/** Parses the `key=value;...` field map from the leading colon-delimited segment of a Copilot token (e.g. `tid=abc;exp=123;rt=1:HMAC...`). */
7
>
export function parseCopilotTokenFields(token: string | undefined): ReadonlyMap<string, string> {
8
const result = new Map<string, string>();
9
if (!token) {