@microsoft/agents-hosting
Version:
Microsoft 365 Agents SDK for JavaScript
36 lines (35 loc) • 1.2 kB
TypeScript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* Represents a claim with a type and value.
*/
export interface Claim {
readonly type: string;
readonly value: string;
}
/**
* Represents an identity with a collection of claims.
*/
export declare class ClaimsIdentity {
readonly claims: Claim[];
private readonly authenticationType?;
/**
* Creates a new instance of the ClaimsIdentity class.
* @param claims The collection of claims associated with the identity.
* @param authenticationType The type of authentication used, or a boolean indicating if the identity is authenticated.
*/
constructor(claims: Claim[], authenticationType?: string | boolean | undefined);
/**
* Indicates whether the identity is authenticated.
* @returns True if the identity is authenticated; otherwise, false.
*/
get isAuthenticated(): boolean;
/**
* Gets the value of a claim by its type.
* @param claimType The type of the claim to retrieve.
* @returns The value of the claim, or null if the claim is not found.
*/
getClaimValue(claimType: string): string | null;
}