fully remove cug:*cyst

This commit is contained in:
Anton Dyudin 2016-09-13 12:11:09 -07:00
parent 704a470ddc
commit e8d2333ec3

View File

@ -111,7 +111,6 @@
== ==
++ cyst :: client session ++ cyst :: client session
$: him/ship :: authenticated $: him/ship :: authenticated
cug/(list @t) :: unacked cookies
lax/@da :: last used lax/@da :: last used
:: vew/(set oryx) :: open views index :: vew/(set oryx) :: open views index
== :: == ::
@ -1074,7 +1073,7 @@
$json (give-json 200 cug p.pez) $json (give-json 200 cug p.pez)
$html (give-html 200 cug p.pez) $html (give-html 200 cug p.pez)
$htme (give-html 401 cug p.pez) $htme (give-html 401 cug p.pez)
$bake (resolve-bake ~ +.pez) $bake (resolve-bake ~ ~ +.pez)
:: ::
$red $red
=+ url=(earn hat pok(p [~ %html]) quy) =+ url=(earn hat pok(p [~ %html]) quy)
@ -1087,8 +1086,8 @@
== ==
:: ::
++ resolve-bake ++ resolve-bake
|= {ses/(unit hole) men/mend mar/mark arg/coin bem/beam} |= {ses/(unit hole) dom/(unit @t) men/mend mar/mark arg/coin bem/beam}
=+ wir=[%at (pack [- +]:(tope -.bem ~)) (fall ses %$) men ~] =+ wir=[%at (pack [- +]:(tope -.bem ~)) (fall ses %$) men ?~(dom ~ [u.dom]~)]
=. -.bem (norm-beak -.bem) =. -.bem (norm-beak -.bem)
=+ req=[%bake mar arg bem] =+ req=[%bake mar arg bem]
=+ red=[%bake %red-quri arg bem] =+ red=[%bake %red-quri arg bem]
@ -1363,7 +1362,7 @@
?- -.ham ?- -.ham
$js [%& %js auth:js] $js [%& %js auth:js]
$json =^ jon ..ya stat-json.yac $json =^ jon ..ya stat-json.yac
[%| (give-json 200 cug.yac jon)] [%| (give-json 200 (set-cookie -):yac jon)]
$xen (show-login-page ~ ses.ham) $xen (show-login-page ~ ses.ham)
:: ::
$at $at
@ -1375,11 +1374,11 @@
$red pez $red pez
$bake $bake
=. ya abet.yac =. ya abet.yac
[%| (resolve-bake `ses.yac +.p.pez)] [%| (resolve-bake `ses.yac dom.yac +.p.pez)]
:: ::
$js $js
=^ jon ..ya stat-json.yac =^ jon ..ya stat-json.yac
[%| (resolve cug.yac p.pez(p (add-json jon p.p.pez)))] [%| (resolve (set-cookie -):yac p.pez(p (add-json jon p.p.pez)))]
== ==
:: ::
$del $del
@ -1408,8 +1407,9 @@
== ==
~|(%auth-fail !!) ~|(%auth-fail !!)
=^ jon ..ya stat-json:(logon:yac him.ham) =^ jon ..ya stat-json:(logon:yac him.ham)
=. cug.yac :_(cug.yac (set-cookie cookie-domain %ship (scot %p him.ham))) =/ ship-cookie (set-cookie cookie-domain %ship (scot %p him.ham))
(give-json 200 cug.yac jon) =/ cug [ship-cookie (set-cookie -):yac]
(give-json 200 cug jon)
== ==
:: ::
++ show-login-page ++ show-login-page
@ -1421,13 +1421,14 @@
?: (~(has by wup) u.ses) ?: (~(has by wup) u.ses)
[%& %htme login-page:xml] [%& %htme login-page:xml]
=+ yac=(new-ya u.ses) =+ yac=(new-ya u.ses)
[%| (give-html(..ya abet.yac) 401 cug.yac login-page:xml)] =/ cug (set-cookie -):yac
[%| (give-html(..ya abet.yac) 401 cug login-page:xml)]
:: ::
++ need-ixor (oryx-to-ixor (need grab-oryx)) ++ need-ixor (oryx-to-ixor (need grab-oryx))
++ for-view ^+(ix (ire-ix need-ixor)) ++ for-view ^+(ix (ire-ix need-ixor))
:: ::
++ for-client :: stateful per-session engine ++ for-client :: stateful per-session engine
^+ ya ^+ [dom=*(unit @t) ya]
=+ pef=cookie-prefix =+ pef=cookie-prefix
=+ lig=(session-from-cookies pef maf) =+ lig=(session-from-cookies pef maf)
?~ lig ?~ lig
@ -1436,7 +1437,7 @@
?~ cyz ?~ cyz
~& bad-cookie+u.lig ~& bad-cookie+u.lig
(new-ya (rsh 3 1 (scot %p (end 6 1 ney)))) (new-ya (rsh 3 1 (scot %p (end 6 1 ney))))
~(. ya u.lig u.cyz(cug ~)) [~ ~(. ya u.lig u.cyz)]
:: ::
++ cookie-domain ++ cookie-domain
^- cord ^- cord
@ -1448,7 +1449,7 @@
{$& *} '' :: XX security? {$& *} '' :: XX security?
== ==
:: ::
++ new-ya |=(ses/hole (new:ya ses cookie-domain)) ++ new-ya |=(ses/hole [`cookie-domain ~(new ya ses *cyst)])
-- --
:: ::
++ oryx-to-ixor |=(a/oryx (rsh 3 1 (scot %p (end 6 1 (shas %ire a))))) ++ oryx-to-ixor |=(a/oryx (rsh 3 1 (scot %p (end 6 1 (shas %ire a)))))
@ -1457,15 +1458,12 @@
=| {ses/hole cyst} =| {ses/hole cyst}
=* cyz -> =* cyz ->
|% |%
++ new |=({a/hole b/@t} (init(ses a) b))
++ abet ..ya(wup (~(put by wup) ses cyz)) ++ abet ..ya(wup (~(put by wup) ses cyz))
++ abut ..ya(wup (~(del by wup) ses)) ++ abut ..ya(wup (~(del by wup) ses))
++ init ++ new
|= domain/@t %_ ..new
%_ +>.$
him `@p`(mix anon (lsh 5 1 (rsh 5 1 (shaf %ship ses)))) him `@p`(mix anon (lsh 5 1 (rsh 5 1 (shaf %ship ses))))
lax now lax now
cug [(set-cookie domain cookie-prefix ses)]~
== ==
:: ::
++ foreign-auth ++ foreign-auth
@ -1474,14 +1472,18 @@
!! !!
:: (ames-gram:abet him [lon+[ses (crip (earn pul)) ~] ~]) :: (ames-gram:abet him [lon+[ses (crip (earn pul)) ~] ~])
:: ::
++ set-cookie
|= domain/(unit @t) ^- (list @t)
?~ domain ~
[(^set-cookie u.domain cookie-prefix ses)]~
::
++ foreign-hat ++ foreign-hat
|= {pul/purl him/ship hat/hart} ^+ ..ya |= {pul/purl him/ship hat/hart} ^+ ..ya
=: dop (~(put by dop) r.hat him) =: dop (~(put by dop) r.hat him)
q.q.pul ['~' %am ses q.q.pul] q.q.pul ['~' %am ses q.q.pul]
== ==
=+ url=(welp (earn pul(p hat)) '#' (head:earn p.pul)) =+ url=(welp (earn pul(p hat)) '#' (head:earn p.pul))
=+ domain=%*(cookie-domain handle hat p.pul) =+ cug=(set-cookie ~ %*(cookie-domain handle hat p.pul))
=+ cug=[(set-cookie domain cookie-prefix ses)]~
%- give-thou:abet %- give-thou:abet
(add-cookies cug [307 [location+(crip url)]~ ~]) (add-cookies cug [307 [location+(crip url)]~ ~])
:: ::