Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Death To Cookies: Long Live JSON Web Tokens

Death To Cookies: Long Live JSON Web Tokens

Cookies have been around for decades and have served us well. Nobody questions their usefulness. However, modern apps demand a better approach. This session is all about the natural successor to cookies: using a token-based design. Tokens help build apps that are assembled on multiple stacks, that use your own and 3rd party APIs, that run on-premises and the cloud. They help easily “flow” user identity across all layers and security contexts, regardless of how they authenticated. And they help you deal with CORS and XSRF. Join a code session in which we’ll implement a token-based app using AngularJs and an API.

Martin Gontovnikas

November 13, 2014
Tweet

More Decks by Martin Gontovnikas

Other Decks in Technology

Transcript

  1. The Following SESSION is Rated R for Live Coding on

    Stage it has been approved for ALL Developers
  2. Browser Web Server (PHP) Realtime (Node) C M Cookies are

    coupled to the web framework modern apps
  3. Browser Web Server (PHP) Realtime (Node) C M API (Node)

    A APIs don’t use Cookies Phones Tablets A modern apps
  4. Browser Web Server (PHP) Realtime (Node) C M API (Ruby)

    API (Node) A A Phones Tablets A modern apps
  5. Browser Web Server (PHP) Realtime (Node) C M API (Ruby)

    API (Node) A A AWS S3 S Phones Tablets A modern apps
  6. Browser Web Server (Python) Realtime (Node) C M API (Ruby)

    API (Node) A A Cookies don’t “flow” AWS S3 S Phones Tablets A modern apps
  7. TouchID Ask User to Login with TouchID Is Private Key

    on KeyChain? Generate Key Pair and store in KeyChain Store Public Key on Server Generate JWT & Sign with Private Key Validate JWT with Public Key on Server Yes No