fix(types): Add custom Express request types for station authentication
This commit is contained in:
8
src/types/express.d.ts
vendored
Normal file
8
src/types/express.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
declare namespace Express {
|
||||
interface Request {
|
||||
/** Set by ScanAuth when the request was authenticated via a station token. Not a header — not spoofable by clients. */
|
||||
isStationAuth?: boolean;
|
||||
/** The authenticated station's DB id. Only present when isStationAuth === true. */
|
||||
stationId?: number;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user