import { AuthDataProvider } from './authDataProvider'; import { KeyProvider } from './publicKeyProvider'; import { ConnectJwt, CredentialsLoader, InstallationQueryStringHashType, InstallationType, QueryStringHashType } from './types'; interface CommonVerifyArgs { asymmetricKeyProvider: KeyProvider; authDataProvider: AuthDataProvider; authorizationMethod?: 'sharedSecret' | 'publicKey' | 'any'; baseUrl: string; credentialsLoader: CredentialsLoader; queryStringHashType?: Q; } export type VerifyInstallationArgs = CommonVerifyArgs; export interface NewInstallationResponse { type: InstallationType.newInstallation; clientKey: string; connectJwt?: ConnectJwt; } export interface UpdateInstallationResponse { type: InstallationType.update; clientKey: string; connectJwt: ConnectJwt; storedEntity: E; } export type VerifyInstallationResponse = NewInstallationResponse | UpdateInstallationResponse; /** * Verifies a Connect request installation. * Use this function to make sure the request is valid before persisting any data. * This function handles both new installations and re-installations or installation updates. */ export declare function verifyInstallation({ asymmetricKeyProvider, authDataProvider, authorizationMethod, baseUrl, credentialsLoader, queryStringHashType, }: VerifyInstallationArgs): Promise>; export type VerifyRequestArgs = CommonVerifyArgs; export interface VerifyRequestResponse { connectJwt: ConnectJwt; storedEntity: E; } /** * Verifies any post-installation incoming connect requests using currently stored Shared Secret. * Use this function to verify the request was actually initiated by Atlassian Connect service and that its content * is not tainted via the Query String Hash algorithm. * This function handles API, frame-loading, context, and some app-lifecycle requests. */ export declare function verifyRequest({ asymmetricKeyProvider, authDataProvider, authorizationMethod, baseUrl, credentialsLoader, queryStringHashType, }: VerifyRequestArgs): Promise>; export interface verifySignedRequestArgs { asymmetricKeyProvider: KeyProvider; authDataProvider: AuthDataProvider; baseUrl: string; queryStringHashType?: QueryStringHashType; unverifiedConnectJwt?: ConnectJwt; } export {}; //# sourceMappingURL=ConnectAuth.d.ts.map