-
Notifications
You must be signed in to change notification settings - Fork 16
/
deno_secure_cookie_map.deno.txt
25 lines (17 loc) · 1.82 KB
/
deno_secure_cookie_map.deno.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
DENO_SECURE_COOKIE_MAP
ALTERNATIVES ==> #See cookie-signature
VERSION ==> #Part of Deno
#Browser compatible
std/http/cookie_map.ts
new SecureCookieMap(...) #Inherits CookieMap (see deno cookie docs), but with additional options
SCOOKIE.signed #BOOL. If false (def), ignore KEYRING.
OPTS.keys #KEYRING
KEYRING.sign('VAR=VAL') #Called on cookie set.
->[>]'SIGNATURE' #Added as a sibling cookie in Set-Cookie [S]
KEYRING.indexOf #Return position of 'SIGNATURE' in the keychain.
('VAR=VAL', 'SIGNATURE')->[>]NUM #Return -1 if not found, i.e. not signed
#Called on cookie get. If -1, original cookie is deleted.
KEYRING.verify
('VAR=VAL', 'SIGNATURE')->[>]BOOL#Does not seem to be called by current implementation