Skip to content

lightgun-poc / lib/auth / resolveKey

Function: resolveKey() ​

resolveKey(flag, random?): object

Defined in: lib/auth.ts:40

Turns the --key flag into a key (or null = auth off, for trusted LANs). A problem means the value was unusable and the caller should refuse to start — silently generating a different key than the one the user asked for would lock their bookmarked URL out.

Parameters ​

flag ​

string | undefined

random? ​

(bytes) => Buffer

Returns ​

object

key ​

key: string | null

problem? ​

optional problem?: string

Released under the MIT License.