import type { Document } from '../../bson'; import { GSSAPICanonicalizationValue } from './gssapi'; import { AuthMechanism } from './providers'; /** @public */ export interface AuthMechanismProperties extends Document { SERVICE_HOST?: string; SERVICE_NAME?: string; SERVICE_REALM?: string; CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue; AWS_SESSION_TOKEN?: string; } /** @public */ export interface MongoCredentialsOptions { username: string; password: string; source: string; db?: string; mechanism?: AuthMechanism; mechanismProperties: AuthMechanismProperties; } /** * A representation of the credentials used by MongoDB * @public */ export declare class MongoCredentials { /** The username used for authentication */ readonly username: string; /** The password used for authentication */ readonly password: string; /** The database that the user should authenticate against */ readonly source: string; /** The method used to authenticate */ readonly mechanism: AuthMechanism; /** Special properties used by some types of auth mechanisms */ readonly mechanismProperties: AuthMechanismProperties; constructor(options: MongoCredentialsOptions); /** Determines if two MongoCredentials objects are equivalent */ equals(other: MongoCredentials): boolean; /** * If the authentication mechanism is set to "default", resolves the authMechanism * based on the server version and server supported sasl mechanisms. * * @param hello - A hello response from the server */ resolveAuthMechanism(hello?: Document): MongoCredentials; validate(): void; static merge(creds: MongoCredentials | undefined, options: Partial): MongoCredentials; } //# sourceMappingURL=mongo_credentials.d.ts.map