UNPKG

@tsonic/dotnet

Version:

TypeScript type definitions for .NET 10 BCL (Base Class Library)

254 lines (222 loc) 10.7 kB
// Generated by tsbindgen - Architecture // Namespace: System.Security.Claims // Assembly: System.Security.Claims // Branded primitive types are sourced from @tsonic/types import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/types'; // Import types from other namespaces import type { IDictionary_2, IEnumerable_1 } from "../../System.Collections.Generic/internal/index.js"; import type { BinaryReader, BinaryWriter } from "../../System.IO/internal/index.js"; import * as System_Security_Principal_Internal from "../../System.Security.Principal/internal/index.js"; import type { IIdentity, IPrincipal } from "../../System.Security.Principal/internal/index.js"; import * as System_Internal from "../../System/internal/index.js"; import type { Boolean as ClrBoolean, Func_1, Func_2, Int32, Object as ClrObject, Predicate_1, String as ClrString, StringComparison, Type, Void } from "../../System/internal/index.js"; // CLROf<T> - Maps ergonomic primitives to their CLR types for generic constraints // This utility is used ONLY in generic type arguments to satisfy CLR interface constraints // Value positions (parameters, return types) use lowercase primitives for ergonomics export type CLROf<T> = T extends sbyte ? System_Internal.SByte : T extends short ? System_Internal.Int16 : T extends int ? System_Internal.Int32 : T extends long ? System_Internal.Int64 : T extends int128 ? System_Internal.Int128 : T extends nint ? System_Internal.IntPtr : T extends byte ? System_Internal.Byte : T extends ushort ? System_Internal.UInt16 : T extends uint ? System_Internal.UInt32 : T extends ulong ? System_Internal.UInt64 : T extends uint128 ? System_Internal.UInt128 : T extends nuint ? System_Internal.UIntPtr : T extends half ? System_Internal.Half : T extends float ? System_Internal.Single : T extends double ? System_Internal.Double : T extends decimal ? System_Internal.Decimal : T extends char ? System_Internal.Char : T extends boolean ? System_Internal.Boolean : T extends string ? System_Internal.String : T; // Identity fallback for non-primitive types export interface Claim$instance { readonly issuer: string; readonly originalIssuer: string; readonly properties: IDictionary_2<CLROf<string>, CLROf<string>>; readonly subject: ClaimsIdentity; readonly type_: string; readonly value: string; readonly valueType: string; clone(): Claim; clone(identity: ClaimsIdentity): Claim; toString(): string; writeTo(writer: BinaryWriter): void; } export const Claim: { new(reader: BinaryReader): Claim$instance; new(reader: BinaryReader, subject: ClaimsIdentity): Claim$instance; new(type_: string, value: string): Claim$instance; new(type_: string, value: string, valueType: string): Claim$instance; new(type_: string, value: string, valueType: string, issuer: string): Claim$instance; new(type_: string, value: string, valueType: string, issuer: string, originalIssuer: string): Claim$instance; new(type_: string, value: string, valueType: string, issuer: string, originalIssuer: string, subject: ClaimsIdentity): Claim$instance; }; export type Claim = Claim$instance; export interface ClaimsIdentity$instance { actor: ClaimsIdentity; readonly authenticationType: string; bootstrapContext: unknown; readonly claims: IEnumerable_1<Claim>; readonly isAuthenticated: boolean; label: string; readonly name: string; readonly nameClaimType: string; readonly roleClaimType: string; addClaim(claim: Claim): void; addClaims(claims: IEnumerable_1<Claim>): void; clone(): ClaimsIdentity; findAll(match: Predicate_1<Claim>): IEnumerable_1<Claim>; findAll(type_: string): IEnumerable_1<Claim>; findFirst(match: Predicate_1<Claim>): Claim; findFirst(type_: string): Claim; hasClaim(match: Predicate_1<Claim>): boolean; hasClaim(type_: string, value: string): boolean; removeClaim(claim: Claim): void; tryRemoveClaim(claim: Claim): boolean; writeTo(writer: BinaryWriter): void; } export const ClaimsIdentity: { new(): ClaimsIdentity$instance; new(identity: IIdentity): ClaimsIdentity$instance; new(claims: IEnumerable_1<Claim>): ClaimsIdentity$instance; new(authenticationType: string): ClaimsIdentity$instance; new(claims: IEnumerable_1<Claim>, authenticationType: string): ClaimsIdentity$instance; new(identity: IIdentity, claims: IEnumerable_1<Claim>): ClaimsIdentity$instance; new(authenticationType: string, nameType: string, roleType: string): ClaimsIdentity$instance; new(claims: IEnumerable_1<Claim>, authenticationType: string, nameType: string, roleType: string): ClaimsIdentity$instance; new(identity: IIdentity, claims: IEnumerable_1<Claim>, authenticationType: string, nameType: string, roleType: string): ClaimsIdentity$instance; new(reader: BinaryReader): ClaimsIdentity$instance; new(reader: BinaryReader, stringComparison: StringComparison): ClaimsIdentity$instance; new(identity: IIdentity, claims: IEnumerable_1<Claim>, authenticationType: string, nameType: string, roleType: string, stringComparison: StringComparison): ClaimsIdentity$instance; readonly defaultIssuer: string; readonly defaultNameClaimType: string; readonly defaultRoleClaimType: string; }; export interface __ClaimsIdentity$views { As_IIdentity(): System_Security_Principal_Internal.IIdentity$instance; } export interface ClaimsIdentity$instance extends System_Security_Principal_Internal.IIdentity$instance {} export type ClaimsIdentity = ClaimsIdentity$instance & __ClaimsIdentity$views; export interface ClaimsPrincipal$instance { readonly claims: IEnumerable_1<Claim>; readonly identities: IEnumerable_1<ClaimsIdentity>; readonly identity: IIdentity; addIdentities(identities: IEnumerable_1<ClaimsIdentity>): void; addIdentity(identity: ClaimsIdentity): void; clone(): ClaimsPrincipal; findAll(match: Predicate_1<Claim>): IEnumerable_1<Claim>; findAll(type_: string): IEnumerable_1<Claim>; findFirst(match: Predicate_1<Claim>): Claim; findFirst(type_: string): Claim; hasClaim(match: Predicate_1<Claim>): boolean; hasClaim(type_: string, value: string): boolean; isInRole(role: string): boolean; writeTo(writer: BinaryWriter): void; } export const ClaimsPrincipal: { new(): ClaimsPrincipal$instance; new(identities: IEnumerable_1<ClaimsIdentity>): ClaimsPrincipal$instance; new(identity: IIdentity): ClaimsPrincipal$instance; new(principal: IPrincipal): ClaimsPrincipal$instance; new(reader: BinaryReader): ClaimsPrincipal$instance; primaryIdentitySelector: Func_2<IEnumerable_1<ClaimsIdentity>, ClaimsIdentity>; claimsPrincipalSelector: Func_1<ClaimsPrincipal>; readonly current: ClaimsPrincipal; }; export interface __ClaimsPrincipal$views { As_IPrincipal(): System_Security_Principal_Internal.IPrincipal$instance; } export interface ClaimsPrincipal$instance extends System_Security_Principal_Internal.IPrincipal$instance {} export type ClaimsPrincipal = ClaimsPrincipal$instance & __ClaimsPrincipal$views; export abstract class ClaimTypes$instance { static readonly authenticationInstant: string; static readonly authenticationMethod: string; static readonly cookiePath: string; static readonly denyOnlyPrimarySid: string; static readonly denyOnlyPrimaryGroupSid: string; static readonly denyOnlyWindowsDeviceGroup: string; static readonly dsa: string; static readonly expiration: string; static readonly expired: string; static readonly groupSid: string; static readonly isPersistent: string; static readonly primaryGroupSid: string; static readonly primarySid: string; static readonly role: string; static readonly serialNumber: string; static readonly userData: string; static readonly version: string; static readonly windowsAccountName: string; static readonly windowsDeviceClaim: string; static readonly windowsDeviceGroup: string; static readonly windowsUserClaim: string; static readonly windowsFqbnVersion: string; static readonly windowsSubAuthority: string; static readonly anonymous: string; static readonly authentication: string; static readonly authorizationDecision: string; static readonly country: string; static readonly dateOfBirth: string; static readonly dns: string; static readonly denyOnlySid: string; static readonly email: string; static readonly gender: string; static readonly givenName: string; static readonly hash: string; static readonly homePhone: string; static readonly locality: string; static readonly mobilePhone: string; static readonly name: string; static readonly nameIdentifier: string; static readonly otherPhone: string; static readonly postalCode: string; static readonly rsa: string; static readonly sid: string; static readonly spn: string; static readonly stateOrProvince: string; static readonly streetAddress: string; static readonly surname: string; static readonly system: string; static readonly thumbprint: string; static readonly upn: string; static readonly uri: string; static readonly webpage: string; static readonly x500DistinguishedName: string; static readonly actor: string; } export type ClaimTypes = ClaimTypes$instance; export abstract class ClaimValueTypes$instance { static readonly base64Binary: string; static readonly base64Octet: string; static readonly boolean_: string; static readonly date: string; static readonly dateTime: string; static readonly double: string; static readonly fqbn: string; static readonly hexBinary: string; static readonly integer: string; static readonly integer32: string; static readonly integer64: string; static readonly sid: string; static readonly string_: string; static readonly time: string; static readonly uInteger32: string; static readonly uInteger64: string; static readonly dnsName: string; static readonly email: string; static readonly rsa: string; static readonly upnName: string; static readonly dsaKeyValue: string; static readonly keyInfo: string; static readonly rsaKeyValue: string; static readonly daytimeDuration: string; static readonly yearMonthDuration: string; static readonly rfc822Name: string; static readonly x500Name: string; } export type ClaimValueTypes = ClaimValueTypes$instance;