@authrim/core 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1607,6 +1607,292 @@ declare class PKCEHelper {
1607
1607
  generateCodeChallenge(verifier: string): Promise<string>;
1608
1608
  }
1609
1609
 
1610
+ /**
1611
+ * Debug Module Types
1612
+ *
1613
+ * Types for debugging and observability features.
1614
+ */
1615
+ /**
1616
+ * Debug options for SDK initialization
1617
+ */
1618
+ interface DebugOptions {
1619
+ /** Enable debug mode */
1620
+ enabled: boolean;
1621
+ /** Enable verbose logging */
1622
+ verbose?: boolean;
1623
+ /** Include timestamps in logs */
1624
+ logTimestamps?: boolean;
1625
+ /** Custom logger implementation */
1626
+ logger?: DebugLogger;
1627
+ /** Maximum events to keep in timeline (default: 100) */
1628
+ maxTimelineEvents?: number;
1629
+ /** Redaction level for sensitive data */
1630
+ redactLevel?: RedactLevel;
1631
+ }
1632
+ /**
1633
+ * Debug logger interface
1634
+ */
1635
+ interface DebugLogger {
1636
+ /** Log a message with optional data */
1637
+ log(level: DebugLogLevel, message: string, data?: unknown): void;
1638
+ }
1639
+ /**
1640
+ * Debug log levels
1641
+ */
1642
+ type DebugLogLevel = 'debug' | 'info' | 'warn' | 'error';
1643
+ /**
1644
+ * Redaction level for sensitive data
1645
+ *
1646
+ * - 'default': Mask token values, keep structure
1647
+ * - 'none': No redaction (only for development)
1648
+ * - 'aggressive': Mask tokens and URL parameters
1649
+ */
1650
+ type RedactLevel = 'default' | 'none' | 'aggressive';
1651
+
1652
+ /**
1653
+ * Diagnostic Logger for SDK
1654
+ *
1655
+ * Provides diagnostic logging capabilities for debugging, troubleshooting,
1656
+ * and OIDF conformance testing. Integrates with server-side diagnostic logs
1657
+ * via diagnosticSessionId.
1658
+ *
1659
+ * Features:
1660
+ * - ID Token validation step logging
1661
+ * - Authentication decision logging
1662
+ * - Session ID correlation with server logs
1663
+ * - Console output and optional collection
1664
+ */
1665
+
1666
+ /**
1667
+ * Diagnostic log level
1668
+ */
1669
+ type DiagnosticLogLevel = 'debug' | 'info' | 'warn' | 'error';
1670
+ /**
1671
+ * Token validation step
1672
+ */
1673
+ type TokenValidationStep = 'issuer-check' | 'audience-check' | 'expiry-check' | 'nonce-check' | 'signature-check' | 'hash-check';
1674
+ /**
1675
+ * Base diagnostic log entry
1676
+ */
1677
+ interface BaseDiagnosticLogEntry {
1678
+ /** Unique log entry ID */
1679
+ id: string;
1680
+ /** Diagnostic session ID (for correlation with server logs) */
1681
+ diagnosticSessionId: string;
1682
+ /** Log category */
1683
+ category: string;
1684
+ /** Log level */
1685
+ level: DiagnosticLogLevel;
1686
+ /** Timestamp (Unix epoch in milliseconds) */
1687
+ timestamp: number;
1688
+ /** Additional metadata */
1689
+ metadata?: Record<string, unknown>;
1690
+ }
1691
+ /**
1692
+ * Token Validation Log Entry
1693
+ */
1694
+ interface TokenValidationLogEntry extends BaseDiagnosticLogEntry {
1695
+ category: 'token-validation';
1696
+ /** Validation step */
1697
+ step: TokenValidationStep;
1698
+ /** Token type (id_token, access_token, etc.) */
1699
+ tokenType: string;
1700
+ /** Validation result */
1701
+ result: 'pass' | 'fail';
1702
+ /** Expected value (for validation) */
1703
+ expected?: unknown;
1704
+ /** Actual value (for validation) */
1705
+ actual?: unknown;
1706
+ /** Error message (if failed) */
1707
+ errorMessage?: string;
1708
+ /** Additional validation details */
1709
+ details?: Record<string, unknown>;
1710
+ }
1711
+ /**
1712
+ * Authentication Decision Log Entry
1713
+ */
1714
+ interface AuthDecisionLogEntry extends BaseDiagnosticLogEntry {
1715
+ category: 'auth-decision';
1716
+ /** Final authentication decision */
1717
+ decision: 'allow' | 'deny';
1718
+ /** Reason for the decision */
1719
+ reason: string;
1720
+ /** Authentication flow */
1721
+ flow?: string;
1722
+ /** Additional decision context */
1723
+ context?: Record<string, unknown>;
1724
+ }
1725
+ /**
1726
+ * Union type of all diagnostic log entries
1727
+ */
1728
+ type DiagnosticLogEntry = TokenValidationLogEntry | AuthDecisionLogEntry;
1729
+ /**
1730
+ * Common interface for diagnostic loggers
1731
+ *
1732
+ * This interface allows different diagnostic logger implementations
1733
+ * (Core SDK, Web SDK, Node SDK) to be used interchangeably.
1734
+ */
1735
+ interface IDiagnosticLogger {
1736
+ /**
1737
+ * Get diagnostic session ID
1738
+ */
1739
+ getDiagnosticSessionId(): string;
1740
+ /**
1741
+ * Check if diagnostic logging is enabled
1742
+ */
1743
+ isEnabled(): boolean;
1744
+ /**
1745
+ * Log token validation step
1746
+ */
1747
+ logTokenValidation(options: {
1748
+ step: TokenValidationStep;
1749
+ tokenType: string;
1750
+ result: 'pass' | 'fail';
1751
+ expected?: unknown;
1752
+ actual?: unknown;
1753
+ errorMessage?: string;
1754
+ details?: Record<string, unknown>;
1755
+ }): void;
1756
+ /**
1757
+ * Log authentication decision
1758
+ */
1759
+ logAuthDecision(options: {
1760
+ decision: 'allow' | 'deny';
1761
+ reason: string;
1762
+ flow?: string;
1763
+ context?: Record<string, unknown>;
1764
+ }): void;
1765
+ }
1766
+ /**
1767
+ * Diagnostic logger options
1768
+ */
1769
+ interface DiagnosticLoggerOptions {
1770
+ /** Enable diagnostic logging */
1771
+ enabled: boolean;
1772
+ /** Underlying debug logger */
1773
+ debugLogger?: DebugLogger;
1774
+ /** Collect logs in memory for export */
1775
+ collectLogs?: boolean;
1776
+ /** Maximum number of logs to collect (default: 1000) */
1777
+ maxLogs?: number;
1778
+ /** Send logs to server (default: false) */
1779
+ sendToServer?: boolean;
1780
+ /** Server URL for sending logs */
1781
+ serverUrl?: string;
1782
+ /** Client ID for authentication */
1783
+ clientId?: string;
1784
+ /** Client secret for authentication (confidential clients only) */
1785
+ clientSecret?: string;
1786
+ /** Batch size for sending logs (default: 50) */
1787
+ batchSize?: number;
1788
+ /** Flush interval in milliseconds (default: 5000) */
1789
+ flushIntervalMs?: number;
1790
+ }
1791
+ /**
1792
+ * Diagnostic Logger for SDK
1793
+ */
1794
+ declare class DiagnosticLogger implements IDiagnosticLogger {
1795
+ private diagnosticSessionId;
1796
+ private enabled;
1797
+ private debugLogger?;
1798
+ private collectLogs;
1799
+ private maxLogs;
1800
+ private logs;
1801
+ private sendToServer;
1802
+ private serverUrl?;
1803
+ private clientId?;
1804
+ private clientSecret?;
1805
+ private batchSize;
1806
+ private flushIntervalMs;
1807
+ private sendBuffer;
1808
+ private flushTimer?;
1809
+ private isFlushing;
1810
+ constructor(options: DiagnosticLoggerOptions);
1811
+ /**
1812
+ * Get diagnostic session ID
1813
+ *
1814
+ * This ID should be sent to the server via X-Diagnostic-Session-Id header
1815
+ * to correlate SDK logs with server logs.
1816
+ */
1817
+ getDiagnosticSessionId(): string;
1818
+ /**
1819
+ * Check if diagnostic logging is enabled
1820
+ */
1821
+ isEnabled(): boolean;
1822
+ /**
1823
+ * Log token validation step
1824
+ */
1825
+ logTokenValidation(options: {
1826
+ step: TokenValidationStep;
1827
+ tokenType: string;
1828
+ result: 'pass' | 'fail';
1829
+ expected?: unknown;
1830
+ actual?: unknown;
1831
+ errorMessage?: string;
1832
+ details?: Record<string, unknown>;
1833
+ }): void;
1834
+ /**
1835
+ * Log authentication decision
1836
+ */
1837
+ logAuthDecision(options: {
1838
+ decision: 'allow' | 'deny';
1839
+ reason: string;
1840
+ flow?: string;
1841
+ context?: Record<string, unknown>;
1842
+ }): void;
1843
+ /**
1844
+ * Get all collected logs
1845
+ */
1846
+ getLogs(): DiagnosticLogEntry[];
1847
+ /**
1848
+ * Export logs as JSON string
1849
+ */
1850
+ exportLogs(): string;
1851
+ /**
1852
+ * Clear collected logs
1853
+ */
1854
+ clearLogs(): void;
1855
+ /**
1856
+ * Get buffered logs count (for debugging)
1857
+ */
1858
+ getBufferedLogsCount(): number;
1859
+ /**
1860
+ * Write log entry (internal)
1861
+ */
1862
+ private writeLog;
1863
+ /**
1864
+ * Buffer log entry for batch sending
1865
+ */
1866
+ private bufferLog;
1867
+ /**
1868
+ * Schedule automatic flush
1869
+ */
1870
+ private scheduleFlush;
1871
+ /**
1872
+ * Flush buffered logs to server
1873
+ */
1874
+ flush(): Promise<void>;
1875
+ /**
1876
+ * Handle send failure
1877
+ */
1878
+ private handleSendFailure;
1879
+ /**
1880
+ * Generate diagnostic session ID
1881
+ */
1882
+ private generateSessionId;
1883
+ /**
1884
+ * Generate log entry ID
1885
+ */
1886
+ private generateEntryId;
1887
+ }
1888
+ /**
1889
+ * Create a diagnostic logger
1890
+ *
1891
+ * @param options - Logger options
1892
+ * @returns DiagnosticLogger instance or null if disabled
1893
+ */
1894
+ declare function createDiagnosticLogger(options: DiagnosticLoggerOptions): DiagnosticLogger | null;
1895
+
1610
1896
  /**
1611
1897
  * Authorization Code Flow
1612
1898
  *
@@ -1706,7 +1992,12 @@ interface ExchangeCodeOptions {
1706
1992
  declare class AuthorizationCodeFlow {
1707
1993
  private readonly http;
1708
1994
  private readonly clientId;
1995
+ private diagnosticLogger?;
1709
1996
  constructor(http: HttpClient, clientId: string);
1997
+ /**
1998
+ * Set diagnostic logger for this flow
1999
+ */
2000
+ setDiagnosticLogger(logger: IDiagnosticLogger | null | undefined): void;
1710
2001
  /**
1711
2002
  * Build authorization URL
1712
2003
  *
@@ -2060,6 +2351,8 @@ declare class AuthrimClient {
2060
2351
  private readonly normalizedIssuer;
2061
2352
  /** Whether the client has been initialized */
2062
2353
  private initialized;
2354
+ /** Diagnostic logger (optional, for OIDF conformance testing) */
2355
+ private diagnosticLogger;
2063
2356
  /**
2064
2357
  * Get the event emitter for subscribing to SDK events
2065
2358
  */
@@ -2333,6 +2626,24 @@ declare class AuthrimClient {
2333
2626
  * @returns Logout result
2334
2627
  */
2335
2628
  logout(options?: LogoutOptions): Promise<LogoutResult>;
2629
+ /**
2630
+ * Set diagnostic logger for OIDF conformance testing
2631
+ *
2632
+ * When a diagnostic logger is set, the SDK will log token validation steps,
2633
+ * authentication decisions, and other diagnostic information.
2634
+ *
2635
+ * @param logger - Diagnostic logger instance (or null to disable)
2636
+ */
2637
+ setDiagnosticLogger(logger: IDiagnosticLogger | null): void;
2638
+ /**
2639
+ * Get diagnostic session ID (if diagnostic logging is enabled)
2640
+ *
2641
+ * This ID should be sent to the server via X-Diagnostic-Session-Id header
2642
+ * to correlate SDK logs with server logs.
2643
+ *
2644
+ * @returns Diagnostic session ID or null if diagnostic logging is disabled
2645
+ */
2646
+ getDiagnosticSessionId(): string | null;
2336
2647
  /**
2337
2648
  * Subscribe to an event
2338
2649
  *
@@ -4012,48 +4323,6 @@ declare class FrontChannelLogoutUrlBuilder {
4012
4323
  validateRequest(url: string | URL, expected?: FrontChannelLogoutValidationOptions): FrontChannelLogoutValidationResult;
4013
4324
  }
4014
4325
 
4015
- /**
4016
- * Debug Module Types
4017
- *
4018
- * Types for debugging and observability features.
4019
- */
4020
- /**
4021
- * Debug options for SDK initialization
4022
- */
4023
- interface DebugOptions {
4024
- /** Enable debug mode */
4025
- enabled: boolean;
4026
- /** Enable verbose logging */
4027
- verbose?: boolean;
4028
- /** Include timestamps in logs */
4029
- logTimestamps?: boolean;
4030
- /** Custom logger implementation */
4031
- logger?: DebugLogger;
4032
- /** Maximum events to keep in timeline (default: 100) */
4033
- maxTimelineEvents?: number;
4034
- /** Redaction level for sensitive data */
4035
- redactLevel?: RedactLevel;
4036
- }
4037
- /**
4038
- * Debug logger interface
4039
- */
4040
- interface DebugLogger {
4041
- /** Log a message with optional data */
4042
- log(level: DebugLogLevel, message: string, data?: unknown): void;
4043
- }
4044
- /**
4045
- * Debug log levels
4046
- */
4047
- type DebugLogLevel = 'debug' | 'info' | 'warn' | 'error';
4048
- /**
4049
- * Redaction level for sensitive data
4050
- *
4051
- * - 'default': Mask token values, keep structure
4052
- * - 'none': No redaction (only for development)
4053
- * - 'aggressive': Mask tokens and URL parameters
4054
- */
4055
- type RedactLevel = 'default' | 'none' | 'aggressive';
4056
-
4057
4326
  /**
4058
4327
  * Event Timeline
4059
4328
  *
@@ -5117,4 +5386,4 @@ interface SilentLoginStateData {
5117
5386
  rt: string;
5118
5387
  }
5119
5388
 
5120
- export { type AddressClaim, type AttestationConveyancePreferenceType, type AuthCallbackCompleteEvent, type AuthCallbackEvent, type AuthCallbackProcessingEvent, type AuthFallbackEvent, type AuthInitEvent, type AuthLoginCompleteEvent, type AuthLogoutCompleteEvent, type AuthPopupBlockedEvent, type AuthRedirectingEvent, type AuthRequiredEvent, type AuthResult, type AuthState, type AuthStateSnapshot, type AuthState$1 as AuthStateType, type AuthenticationExtensionsClientInputsType, type AuthenticationResponseJSON, type AuthenticatorAssertionResponseJSON, type AuthenticatorAttachmentType, type AuthenticatorAttestationResponseJSON, type AuthenticatorSelectionCriteriaType, type AuthenticatorTransportType, AuthorizationCodeFlow, type AuthorizationContext, type AuthorizationUrlResult, AuthrimClient, type AuthrimClientConfig, AuthrimError, type AuthrimErrorCode, type AuthrimErrorMeta, type AuthrimErrorOptions, type AuthrimErrorRemediation, type AuthrimErrorSeverity, type AuthrimErrorUserAction, type AuthrimEventHandler, type AuthrimEventName, type AuthrimEvents, type AuthrimStorage, type AutoRefreshOptions, AutoRefreshScheduler, type BaseEventPayload, type BuildAuthorizationUrlOptions, type COSEAlgorithmIdentifier, type CheckSessionMessage, type CheckSessionResponse, type ClientAssertionClaims, type ClientAuthMethod, type ClientAuthResult, type ClientCredentials, ClientCredentialsClient, type ClientCredentialsClientOptions, type ClientCredentialsTokenOptions, type ClientSecretCredentials, type CodeChallengeMethod, type CoreEventName, type CryptoProvider, type DPoPCryptoProvider, type DPoPKeyPair, DPoPManager, type DPoPManagerConfig, type DPoPProofClaims, type DPoPProofHeader, type DPoPProofOptions, DebugContext, type DebugLogLevel, type DebugLogger, type DebugOptions, type DebugTimelineEvent, type DecodedJwt, type DeviceAuthorizationResponse, type DeviceFlowAccessDeniedResult, DeviceFlowClient, type DeviceFlowCompletedResult, type DeviceFlowExpiredResult, type DeviceFlowPendingResult, type DeviceFlowPollResult, type DeviceFlowSlowDownResult, type DeviceFlowStartOptions, type DeviceFlowState, type DirectAuthClient, type DirectAuthClientConfig, type DirectAuthError, type DirectAuthLogoutOptions, type DirectAuthTokenRequest, type DirectAuthTokenResponse, DiscoveryClient, type EmailCodeAuth, type EmailCodeSendOptions, type EmailCodeSendRequest, type EmailCodeSendResponse, type EmailCodeSendResult, type EmailCodeVerifyOptions, type EmailCodeVerifyRequest, type EmailCodeVerifyResponse, type EmitClassifiedErrorOptions, type EndpointOverrides, type ErrorClassification, type ErrorEvent, type ErrorEventEmitter, type ErrorEventPayload, type ErrorFatalEvent, type ErrorRecoverableEvent, type ErrorSeverity, EventEmitter, EventTimeline, type ExchangeCodeOptions, type FrontChannelLogoutBuildParams, type FrontChannelLogoutParams, FrontChannelLogoutUrlBuilder, type FrontChannelLogoutUrlOptions, type FrontChannelLogoutUrlResult, type FrontChannelLogoutValidationOptions, type FrontChannelLogoutValidationResult, type GenerateAuthStateOptions, type HashOptions, type HttpClient, type HttpOptions, type HttpResponse, type IntrospectTokenOptions, type IntrospectionResponse, type IntrospectionTokenTypeHint, JARBuilder, type JARBuilderConfig, type JARMResponseClaims, type JARMValidationOptions, type JARMValidationResult, JARMValidator, type JARMValidatorConfig, type JARRequestObjectClaims, type JARRequestOptions, type JWK, type JwtHeader, LogoutHandler, type LogoutHandlerOptions, type LogoutOptions, type LogoutResult, type LogoutTokenClaims, type MfaMethod, type NextAction, type NoClientCredentials, type OAuthErrorResponse, type OIDCDiscoveryDocument, PARClient, type PARClientOptions, type PARRequest, type PARResponse, type PARResult, PKCEHelper, type PKCEPair, type PasskeyAuth, type PasskeyCredential, type PasskeyLoginFinishRequest, type PasskeyLoginFinishResponse, type PasskeyLoginOptions, type PasskeyLoginStartRequest, type PasskeyLoginStartResponse, type PasskeyRegisterOptions, type PasskeySignUpOptions, type PasskeySignupFinishRequest, type PasskeySignupFinishResponse, type PasskeySignupStartRequest, type PasskeySignupStartResponse, type PrivateKeyJwtCredentials, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialDescriptorJSON, type PublicKeyCredentialParametersType, type PublicKeyCredentialRequestOptionsJSON, type PublicKeyCredentialRpEntityType, type PublicKeyCredentialType, type PublicKeyCredentialUserEntityJSON, type RedactLevel, type RegistrationResponseJSON, type ResidentKeyRequirementType, type ResolvedConfig, type RetryOptions, type RevokeTokenOptions, STORAGE_KEYS, type Session, type SessionAuth, type SessionChangeEvent, type SessionChangedEvent, type SessionCheckResult, type SessionEndedEvent, type SessionLogoutBroadcastEvent, type SessionManagementConfig, SessionManager, type SessionManagerOptions, type SessionStartedEvent, type SessionState, SessionStateCalculator, type SessionStateCalculatorOptions, type SessionStateParams, type SessionStateResult, type SessionSyncEvent, SilentAuthHandler, type SilentAuthOptions, type SilentAuthResult, type SilentAuthUrlResult, type SilentLoginResult, type SilentLoginStateData, type SocialAuth, type SocialLoginOptions, type SocialProvider, type StandardClaims, type StateChangeEvent, StateManager, TOKEN_TYPE_URIS, type TimelineEntry, TokenApiClient, type TokenApiClientOptions, type TokenErrorEvent, type TokenExchangeRequest, type TokenExchangeResponse, type TokenExchangeResult, type TokenExchangedEvent, type TokenExpiredEvent, type TokenExpiringEvent, TokenIntrospector, type TokenIntrospectorOptions, TokenManager, type TokenManagerOptions, type TokenRefreshFailedEvent, type TokenRefreshedEvent, type TokenRefreshingEvent, type TokenResponse, TokenRevoker, type TokenRevokerOptions, type TokenSet, type TokenTypeHint, type TokenTypeUri, type TrySilentLoginOptions, type User, type UserInfo, type UserVerificationRequirementType, type WarningITPEvent, type WarningPrivateModeEvent, type WarningStorageFallbackEvent, type WebOnlyEventName, base64urlDecode, base64urlEncode, base64urlToString, buildClientAuthentication, calculateBackoffDelay, calculateDsHash, classifyError, createAuthrimClient, createCancellableOperation, createConsoleLogger, createDebugLogger, createRetryFunction, decodeIdToken, decodeJwt, emitClassifiedError, getErrorMeta, getIdTokenNonce, isCancellationError, isJarRequired, isJwtExpired, isRetryableError, noopLogger, normalizeIssuer, parseRetryAfterHeader, raceWithCancellation, resolveConfig, sleep, stringToBase64url, timingSafeEqual, withAbortSignal, withRetry };
5389
+ export { type AddressClaim, type AttestationConveyancePreferenceType, type AuthCallbackCompleteEvent, type AuthCallbackEvent, type AuthCallbackProcessingEvent, type AuthDecisionLogEntry, type AuthFallbackEvent, type AuthInitEvent, type AuthLoginCompleteEvent, type AuthLogoutCompleteEvent, type AuthPopupBlockedEvent, type AuthRedirectingEvent, type AuthRequiredEvent, type AuthResult, type AuthState, type AuthStateSnapshot, type AuthState$1 as AuthStateType, type AuthenticationExtensionsClientInputsType, type AuthenticationResponseJSON, type AuthenticatorAssertionResponseJSON, type AuthenticatorAttachmentType, type AuthenticatorAttestationResponseJSON, type AuthenticatorSelectionCriteriaType, type AuthenticatorTransportType, AuthorizationCodeFlow, type AuthorizationContext, type AuthorizationUrlResult, AuthrimClient, type AuthrimClientConfig, AuthrimError, type AuthrimErrorCode, type AuthrimErrorMeta, type AuthrimErrorOptions, type AuthrimErrorRemediation, type AuthrimErrorSeverity, type AuthrimErrorUserAction, type AuthrimEventHandler, type AuthrimEventName, type AuthrimEvents, type AuthrimStorage, type AutoRefreshOptions, AutoRefreshScheduler, type BaseDiagnosticLogEntry, type BaseEventPayload, type BuildAuthorizationUrlOptions, type COSEAlgorithmIdentifier, type CheckSessionMessage, type CheckSessionResponse, type ClientAssertionClaims, type ClientAuthMethod, type ClientAuthResult, type ClientCredentials, ClientCredentialsClient, type ClientCredentialsClientOptions, type ClientCredentialsTokenOptions, type ClientSecretCredentials, type CodeChallengeMethod, type CoreEventName, type CryptoProvider, type DPoPCryptoProvider, type DPoPKeyPair, DPoPManager, type DPoPManagerConfig, type DPoPProofClaims, type DPoPProofHeader, type DPoPProofOptions, DebugContext, type DebugLogLevel, type DebugLogger, type DebugOptions, type DebugTimelineEvent, type DecodedJwt, type DeviceAuthorizationResponse, type DeviceFlowAccessDeniedResult, DeviceFlowClient, type DeviceFlowCompletedResult, type DeviceFlowExpiredResult, type DeviceFlowPendingResult, type DeviceFlowPollResult, type DeviceFlowSlowDownResult, type DeviceFlowStartOptions, type DeviceFlowState, type DiagnosticLogEntry, type DiagnosticLogLevel, DiagnosticLogger, type DiagnosticLoggerOptions, type DirectAuthClient, type DirectAuthClientConfig, type DirectAuthError, type DirectAuthLogoutOptions, type DirectAuthTokenRequest, type DirectAuthTokenResponse, DiscoveryClient, type EmailCodeAuth, type EmailCodeSendOptions, type EmailCodeSendRequest, type EmailCodeSendResponse, type EmailCodeSendResult, type EmailCodeVerifyOptions, type EmailCodeVerifyRequest, type EmailCodeVerifyResponse, type EmitClassifiedErrorOptions, type EndpointOverrides, type ErrorClassification, type ErrorEvent, type ErrorEventEmitter, type ErrorEventPayload, type ErrorFatalEvent, type ErrorRecoverableEvent, type ErrorSeverity, EventEmitter, EventTimeline, type ExchangeCodeOptions, type FrontChannelLogoutBuildParams, type FrontChannelLogoutParams, FrontChannelLogoutUrlBuilder, type FrontChannelLogoutUrlOptions, type FrontChannelLogoutUrlResult, type FrontChannelLogoutValidationOptions, type FrontChannelLogoutValidationResult, type GenerateAuthStateOptions, type HashOptions, type HttpClient, type HttpOptions, type HttpResponse, type IDiagnosticLogger, type IntrospectTokenOptions, type IntrospectionResponse, type IntrospectionTokenTypeHint, JARBuilder, type JARBuilderConfig, type JARMResponseClaims, type JARMValidationOptions, type JARMValidationResult, JARMValidator, type JARMValidatorConfig, type JARRequestObjectClaims, type JARRequestOptions, type JWK, type JwtHeader, LogoutHandler, type LogoutHandlerOptions, type LogoutOptions, type LogoutResult, type LogoutTokenClaims, type MfaMethod, type NextAction, type NoClientCredentials, type OAuthErrorResponse, type OIDCDiscoveryDocument, PARClient, type PARClientOptions, type PARRequest, type PARResponse, type PARResult, PKCEHelper, type PKCEPair, type PasskeyAuth, type PasskeyCredential, type PasskeyLoginFinishRequest, type PasskeyLoginFinishResponse, type PasskeyLoginOptions, type PasskeyLoginStartRequest, type PasskeyLoginStartResponse, type PasskeyRegisterOptions, type PasskeySignUpOptions, type PasskeySignupFinishRequest, type PasskeySignupFinishResponse, type PasskeySignupStartRequest, type PasskeySignupStartResponse, type PrivateKeyJwtCredentials, type PublicKeyCredentialCreationOptionsJSON, type PublicKeyCredentialDescriptorJSON, type PublicKeyCredentialParametersType, type PublicKeyCredentialRequestOptionsJSON, type PublicKeyCredentialRpEntityType, type PublicKeyCredentialType, type PublicKeyCredentialUserEntityJSON, type RedactLevel, type RegistrationResponseJSON, type ResidentKeyRequirementType, type ResolvedConfig, type RetryOptions, type RevokeTokenOptions, STORAGE_KEYS, type Session, type SessionAuth, type SessionChangeEvent, type SessionChangedEvent, type SessionCheckResult, type SessionEndedEvent, type SessionLogoutBroadcastEvent, type SessionManagementConfig, SessionManager, type SessionManagerOptions, type SessionStartedEvent, type SessionState, SessionStateCalculator, type SessionStateCalculatorOptions, type SessionStateParams, type SessionStateResult, type SessionSyncEvent, SilentAuthHandler, type SilentAuthOptions, type SilentAuthResult, type SilentAuthUrlResult, type SilentLoginResult, type SilentLoginStateData, type SocialAuth, type SocialLoginOptions, type SocialProvider, type StandardClaims, type StateChangeEvent, StateManager, TOKEN_TYPE_URIS, type TimelineEntry, TokenApiClient, type TokenApiClientOptions, type TokenErrorEvent, type TokenExchangeRequest, type TokenExchangeResponse, type TokenExchangeResult, type TokenExchangedEvent, type TokenExpiredEvent, type TokenExpiringEvent, TokenIntrospector, type TokenIntrospectorOptions, TokenManager, type TokenManagerOptions, type TokenRefreshFailedEvent, type TokenRefreshedEvent, type TokenRefreshingEvent, type TokenResponse, TokenRevoker, type TokenRevokerOptions, type TokenSet, type TokenTypeHint, type TokenTypeUri, type TokenValidationLogEntry, type TokenValidationStep, type TrySilentLoginOptions, type User, type UserInfo, type UserVerificationRequirementType, type WarningITPEvent, type WarningPrivateModeEvent, type WarningStorageFallbackEvent, type WebOnlyEventName, base64urlDecode, base64urlEncode, base64urlToString, buildClientAuthentication, calculateBackoffDelay, calculateDsHash, classifyError, createAuthrimClient, createCancellableOperation, createConsoleLogger, createDebugLogger, createDiagnosticLogger, createRetryFunction, decodeIdToken, decodeJwt, emitClassifiedError, getErrorMeta, getIdTokenNonce, isCancellationError, isJarRequired, isJwtExpired, isRetryableError, noopLogger, normalizeIssuer, parseRetryAfterHeader, raceWithCancellation, resolveConfig, sleep, stringToBase64url, timingSafeEqual, withAbortSignal, withRetry };