Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
JWT in GO
Search
Yamil Asusta
October 16, 2014
Programming
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JWT in GO
Simple walkthrough of JWT with a sample app
Yamil Asusta
October 16, 2014
Transcript
19 slides
JWTs Yamil Asusta Developer Evangelist" @elbuo8
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX VCJ9.eyJuYW1lIjoiWWFtaWwgQ XN1c3RhIiwicm9sZSI6IkRldmVsb3 BlciBFdmFuZ2VsaXN0IiwibG9jYX Rpb24iOiJOWUMgJiBQUiIsImxpa2 VzIjpbIkJlZXIiLCJUcmF2ZWxpbmci LCJQcm9ncmFtbWluZyJdfQ.9k- YwDwlrwMtNNCQ1YGkMldF8sS6 ZOTTAnhvE39WFPo
JSON Web Token (JWT)
JSON Web Token (JWT) is a compact URL-safe means of
representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is digitally signed using JSON Web Signature (JWS). IETF
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiWWFtaWwgQ XN1c3RhIiwicm9sZSI6IkRldmVsb3BlciBFdmFuZ2VsaXN0IiwibG9jY XRpb24iOiJOWUMgJiBQUiIsImxpa2VzIjpbIkJlZXIiLCJUcmF2ZWxpb mciLCJQcm9ncmFtbWluZyJdfQ.9k- YwDwlrwMtNNCQ1YGkMldF8sS6ZOTTAnhvE39WFPo
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
{" "alg": "HS256"," "typ": "JWT"" }
eyJuYW1lIjoiWWFtaWwgQXN1c3RhIiwicm9sZSI6IkRldm Vsb3BlciBFdmFuZ2VsaXN0IiwibG9jYXRpb24iOiJOWUMg JiBQUiIsImxpa2VzIjpbIkJlZXIiLCJUcmF2ZWxpbmciLCJQc m9ncmFtbWluZyJdfQ
{ "name": "Yamil Asusta", "role": "Developer Evangelist", "location": "NYC &
PR", "likes": [ "Beer", "Traveling", "Programming" ] }
9k- YwDwlrwMtNNCQ1YGkMldF8sS6ZOTTAnhvE39WFPo
How do I generate the token?
base64(headers) + “.” + base64(claims) + “.” +" sign(claims, secret)
Why?
User User App Session Store(s) App JWT Approach Cookie Approach
To the code!
/dgrijalva/jwt-go
/codegangsta/negroni
$ openssl genrsa -out demo.rsa 1024" " $ openssl rsa
-in demo.rsa -pubout > demo.rsa.pub
None
More Decks by Yamil Asusta
See All by Yamil Asusta
After Years of Node in Prod, We Still Block the Event Loop
elbuo8
0
110
Breaking the "Apply Online"
elbuo8
1
160
Other Decks in Programming
See All in Programming
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
320
Canvas 2D Context Next
petamoriken
0
750
AIコーディングをセッションで終わらせない: PHPライブラリ開発におけるコンテキスト承継設計
ickx
0
110
SODA - FACT BOOK(EN)
sodainc
1
300
Kotlin Fest 2026: Kotlin コンパイラに Contribute してみよう! - Kotlin/Wasm で深い再帰を書けるようにした話
ternbusty
1
430
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1.1k
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
670
将来の標準フォーマッター?ktfmtを深堀る
t45k
1
250
ruby/uri meets WHATWG
jinroq
0
180
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
240
Math.sumPreciseから学ぶ、ECMAScript仕様の数値の種類
syumai
0
1.2k
SODA - FACT BOOK(JP)
sodainc
1
40k
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Product Roadmaps are Hard
iamctodd
55
13k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.6k
Being A Developer After 40
akosma
PRO
92
590k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
760
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Amusing Abliteration
ianozsvald
1
400
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.5k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Code Review Best Practice
trishagee
74
20k
We Have a Design System, Now What?
morganepeng
55
8.4k