import { LinkedInSignInCredentials, LinkedInUserRetrievedData } from '../types'; /** * Class to handle LinkedIn OAuth authentication. * Provides methods to exchange authorization codes for tokens, * decode ID tokens, and validate user credentials. */ export declare class LinkedInAuthHandler { private readonly credentials; /** * Constructor to initialize the LinkedInAuthHandler with the necessary credentials. * @param {LinkedInSignInCredentials} credentials - Credentials object containing clientId, clientSecret, and redirectURI. */ constructor(credentials: LinkedInSignInCredentials); /** * Exchanges the authorization code for LinkedIn tokens (access token, ID token). * @param {string} authorizationCode - The authorization code received from LinkedIn during OAuth flow. * @returns {Promise} - Returns a promise that resolves to the token exchange data. * @throws {LinkedInAuthError} - Throws an error if the exchange process fails. */ private exchangeAuthorizationCode; /** * Decodes and validates the given ID token using LinkedIn's public key. * @param {string} idToken - ID token received from LinkedIn. * @returns {Promise} The decoded token payload. */ private static decodeIdToken; /** * Decodes and verifies the provided ID token, extracting user information. * @param {LinkedInUserCodeExchangedData} codeExchangeData - The exchanged code containing the ID token to be decoded. * @returns {Promise} The decoded user data. * @throws {LinkedInAuthError} - Throws an error if token validation fails. */ private retrieveUserInfo; /** * Validates user credentials by exchanging an authorization code and decoding the ID token. * @param {object} param0 - Object containing the authorization code. * @param {string} param0.authorizationCode - The authorization code to be exchanged. * @returns {Promise} The validated and decoded user data. * @throws {LinkedInAuthError} - Throws an error if credential validation fails. */ validateUserCredentials({ authorizationCode }: { authorizationCode: string; }): Promise; /** * Validates the issuer of the ID token. * @param {string | undefined} issuer - The issuer to be validated. * @returns {boolean} True if the issuer is valid; otherwise, false. */ private isIssuerValid; }