Class: CookieStore
Extends
Map
<string
,string
>
Constructors
new CookieStore()
new CookieStore(
request
:ApiRequest
,response
:ApiResponse
<IncomingMessage
>,secure
:boolean
,domainOverwrite
?:null
|string
):CookieStore
Parameters
Parameter | Type |
---|---|
request | ApiRequest |
response | ApiResponse <IncomingMessage > |
secure | boolean |
domainOverwrite ? | null | string |
Returns
Overrides
Map<string, string>.constructor
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:14
Properties
domain
private
domain:string
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:11
request
protected
request:ApiRequest
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:9
response
protected
response:ApiResponse
<IncomingMessage
>
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:10
secure
private
secure:boolean
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:12
octetRegExp
private
readonly
static
octetRegExp:RegExp
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:125
Methods
add()
add(
name
:string
,value
:string
,options
?:SecureCookieStoreSetOptions
):void
Parameters
Parameter | Type |
---|---|
name | string |
value | string |
options ? | SecureCookieStoreSetOptions |
Returns
void
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:45
getHostDomain()
private
getHostDomain(host
:string
):string
Parses a host using the tldts library to extract the domain. This is used for the domain of the cookie
Parameters
Parameter | Type | Description |
---|---|---|
host | string | The hot to parse |
Returns
string
Either the host in all lower case or the parsed domain, ready for use on cookies
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:110
insert()
protected
insert(name
:string
,entry
:string
):void
Parameters
Parameter | Type |
---|---|
name | string |
entry | string |
Returns
void
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:53
prepare()
protected
prepare(name
:string
,value
:string
,__namedParameters
:SecureCookieStoreSetOptions
):string
Parameters
Parameter | Type |
---|---|
name | string |
value | string |
__namedParameters | SecureCookieStoreSetOptions |
Returns
string
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:68
remove()
remove(
name
:string
):void
Parameters
Parameter | Type |
---|---|
name | string |
Returns
void
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:49
encodeCookieOctet()
private
static
encodeCookieOctet(value
:string
):string
Parameters
Parameter | Type |
---|---|
value | string |
Returns
string
Defined in
projects/plugins/packages/api/src/lib/structures/api/CookieStore.ts:127