/********************************************************************
 * @author:      Kaven
 * @email:       kaven@wuwenkai.com
 * @website:     http://blog.kaven.xyz
 * @file:        [Kaven-Utils] /src/net/authentication/KavenAuthentication.ts
 * @create:      2019-03-26 14:16:54.029
 * @modify:      2023-12-07 10:59:05.572
 * @version:     5.4.0
 * @times:       35
 * @lines:       121
 * @copyright:   Copyright © 2019-2023 Kaven. All Rights Reserved.
 * @description: [description]
 * @license:     [license]
 ********************************************************************/
import { HttpStatusCode } from "kaven-basic";
import { IHttpAuthorizationInfo } from "../../base/Interfaces.js";
import { HttpResponseMessage } from "../http/HttpResponseMessage.js";
import { KavenAuthorizationRecords } from "./KavenAuthorizationRecords.js";
export declare abstract class KavenAuthentication {
    UserName: string;
    Password: string;
    /**
     * A string to be displayed to users so they know which username and
     * password to use.
     *
     * This string should contain at least the name of
     * the host performing the authentication and might additionally
     * indicate the collection of users who might have access.
     */
    Realm: string;
    /**
     * WWW-Authenticate or Proxy-Authenticate
     */
    ResponseHeaderName: string;
    abstract Name: string;
    /**
     * @since 4.3.6
     * @version 2022-09-20
     */
    Records: KavenAuthorizationRecords | undefined;
    constructor(userName: string, password: string);
    get StatusCode(): HttpStatusCode.Unauthorized | HttpStatusCode.ProxyAuthenticationRequired;
    get RequestHeaderName(): "Proxy-Authorization" | "Authorization";
    abstract Authenticate(req: IHttpAuthorizationInfo): Promise<boolean>;
    abstract Update(response: HttpResponseMessage): HttpResponseMessage;
    CanAuthenticate(key: string): boolean;
    AddRecord(key: string, success: boolean): void;
    GetResponse(message?: string, statusCode?: HttpStatusCode): HttpResponseMessage;
}
