Double Submit Cookie Pattern: Smart people always double check their work

Image for post
Image for post
[Source - http://www.abbottcartoons.com/wp-content/uploads/BA0329-hole-shouldnt-be-there-copy-1-400x499.jpg]

Why though double submit the cookie?

Main flow of the Double Submit Cookie Pattern

Image for post
Image for post
Fig 1 - High-level Architecture diagram of Double Submit Cookie Pattern used in a Money Transfer Application
Image for post
Image for post
Fig 2 - Login Page
login.html
AuthenticationService.java
LoginController.java
Image for post
Image for post
Fig 3 - Money transfer page
transfer.html
main.js
TransferController.java
Image for post
Image for post
Fig 4 - Transaction with success message (after the state changing operation)

Written by

Inquisitive

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store