GuestPasses
Anonymous passes: “
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GuestPasses(
secret):GuestPasses
Parameters
Section titled “Parameters”secret
Section titled “secret”string | Buffer<ArrayBufferLike>
Returns
Section titled “Returns”GuestPasses
Methods
Section titled “Methods”check()
Section titled “check()”check(
scope,value):string|null
The pass id (never the pass itself) when the value is a pass for this scope, else null.
Parameters
Section titled “Parameters”string
string | undefined
Returns
Section titled “Returns”string | null
issue()
Section titled “issue()”issue(
scope):string
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
cookie()
Section titled “cookie()”
staticcookie(name,pass,path,secure,maxAgeSec?):string
The Set-Cookie value for a pass (HttpOnly, SameSite=Strict, limited to path).
Parameters
Section titled “Parameters”string
string
string
secure
Section titled “secure”boolean
maxAgeSec?
Section titled “maxAgeSec?”number = ...
Returns
Section titled “Returns”string
defaultName()
Section titled “defaultName()”
staticdefaultName(id):string
“Guest 4821”: a stable default name from a pass id.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string