import { AuthenticationClass } from '../embed/AuthenticationClass.mjs'; /** * * Configuration for authenticating users via an externally-issued JWT. Specifies how the token * should be validated and which JWT field is used to locate the matching iCure user. * / */ export declare class ExternalJwtConfig { /** * * The method used to verify the external JWT signature (public-key or OIDC discovery). */ validationMethod: ExternalJwtConfig.ValidationMethod; /** * * The JWT field selector that identifies which user field to match against. */ fieldSelector: ExternalJwtConfig.FieldSelector; /** * * The authentication class assigned to sessions created through this configuration. */ authenticationClass: AuthenticationClass; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): ExternalJwtConfig; } export declare namespace ExternalJwtConfig { namespace ValidationMethod { /** * * Validates the JWT using a static public key. * / */ class PublicKey { /** * * The PEM-encoded or Base64-encoded public key material. */ key: string; /** * * The signature algorithm to use; defaults to the algorithm declared in the JWT header when * null. */ signatureAlgorithm: string | undefined; /** * * An optional client identifier to verify against the JWT audience claim. */ clientId: string | undefined; readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.PublicKey'; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): PublicKey; } /** * * * Validates the JWT using OIDC discovery from the specified issuer location. */ class Oidc { /** * * The OIDC issuer URL used to retrieve the JWKS for signature verification. */ issuerLocation: string; /** * * An optional client identifier to verify against the JWT audience claim. */ clientId: string | undefined; readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.ValidationMethod.Oidc'; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): Oidc; } function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): ValidationMethod; } /** * * Sealed interface representing the strategy used to validate the external JWT signature. * / */ type ValidationMethod = ValidationMethod.PublicKey | ValidationMethod.Oidc; namespace FieldSelector { /** * * * Selects users by matching a JWT field against the user's local identifier. */ class LocalId { /** * * The name of the JWT claim containing the local identifier value. */ fieldName: string; readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.LocalId'; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): LocalId; } /** * * * Selects users by matching a JWT field against the user's email address. */ class Email { /** * * The name of the JWT claim containing the email value. */ fieldName: string; readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Email'; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): Email; } /** * * * Selects users by matching a JWT field against the user's mobile phone number. */ class MobilePhone { /** * * The name of the JWT claim containing the mobile phone value. */ fieldName: string; readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.MobilePhone'; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): MobilePhone; } /** * * * Selects users by matching a JWT field against the user's username. */ class Username { /** * * The name of the JWT claim containing the username value. */ fieldName: string; readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Username'; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): Username; } /** * * * Selects users by matching a JWT field against a structured identifier with a specific * assigner. */ class Identifier { /** * * The assigner system for the identifier to match against. */ identifierAssigner: string; /** * * The name of the JWT claim containing the identifier value. */ fieldName: string; readonly $ktClass: 'com.icure.cardinal.sdk.model.security.ExternalJwtConfig.FieldSelector.Identifier'; constructor(partial: Partial & Pick); toJSON(): object; static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): Identifier; } function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array): FieldSelector; } /** * * Sealed interface representing the strategy used to extract the user-matching value from the * external JWT claims. * / */ type FieldSelector = FieldSelector.LocalId | FieldSelector.Email | FieldSelector.MobilePhone | FieldSelector.Username | FieldSelector.Identifier; }