Skip to content

Instantly share code, notes, and snippets.

@FCO
Last active February 5, 2020 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FCO/82b48d1eb3e2129993040078752281a4 to your computer and use it in GitHub Desktop.
Save FCO/82b48d1eb3e2129993040078752281a4 to your computer and use it in GitHub Desktop.
event get-login {
has $request = $<request>
has $response = $<response>
match {
<request method=“GET” path=“/login”>
<response reponse-for=$request>
}
}
event post-login {
has $request = $<request>
has $response = $<response>
match {
<request method=“POST” path=“/login”>
<response response-for=$request>
}
}
event login {
has $get = $<get-login>
has $post = $<post-login>
has $session-id = $post.response.cookies.session-id
match {
<get-login>
<post-login header.form-id=$get.response.header.form-id>
}
}
event session {
has $session-id = $<login>.session-id
has @requests = $<request>
match {
<login>
<request cookies.session-id=$session-id>* % ..5min
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment