UNPKG

@citrineos/util

Version:

The OCPP util module which supplies helpful utilities like cache and queue connectors, etc.

15 lines (14 loc) 482 B
import { IncomingMessage } from 'http'; /** * Extracts credentials from the Authorization header. * * The Authorization header is formatted as follows: * AUTHORIZATION: Basic <Base64 encoded(<Configured ChargingStationId>:<Configured BasicAuthPassword>)> * * @param {http.IncomingMessage} req - The request object. * @returns Extracted credentials. */ export declare function extractBasicCredentials(req: IncomingMessage): { username?: string; password?: string; };