Documentation
    Preparing search index...

    A rudimentary Basic Authentication implementation (RFC 7617). Parses Authorization: Basic <base64> headers for hardcoded credentials.

    Index

    Constructors

    Methods

    Constructors

    • Instantiates a new AuthBasic verifier with target credentials.

      Parameters

      • user: string

        The expected username.

      • pass: string

        The expected password.

      Returns AuthBasic

    Methods

    • Returns an Express-compatible API middleware. Validates the request headers against the configured Basic credentials.

      Returns ApiMiddleware

      The middleware function.

    • Instantiates a new Basic Auth verifier.

      Parameters

      • OptionaluserOrConfig: any

        Username string, or a config object containing {user, pass}.

      • Optionalpass: string

        Password string.

      Returns AuthBasic | null

      The generated instance, or null if params are invalid.