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-fukuoka-go.pdf
Search
fukuda Ryusei
October 04, 2018
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jwt-fukuoka-go.pdf
fukuda Ryusei
October 04, 2018
More Decks by fukuda Ryusei
See All by fukuda Ryusei
Line-Bot
aeleniumfor
0
63
dockerを使ってDjangoを
aeleniumfor
0
70
Featured
See All Featured
Thoughts on Productivity
jonyablonski
76
5.4k
From π to Pie charts
rasagy
1
400
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
The Curious Case for Waylosing
cassininazir
1
570
My Coaching Mixtape
mlcsv
0
360
Mind Mapping
helmedeiros
1
400
The SEO Collaboration Effect
kristinabergwall1
1
590
Optimising Largest Contentful Paint
csswizardry
37
4k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
740
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Transcript
JWT?なにそれ美味しいの? #Fukuoka.go
自己紹介 名前 : 福田隆誠 大学 : 福岡工業大学 JWT歴 : 2週間
Twitter : @nenesarn Qiita : https://qiita.com/aeleniumfor
JWTとは? JsonWebToken eyJhbGciOiJIUzI1NiIsI nR5cCI6IkpXVCJ9.eyJ uYW1lIjoiam9uIiwiYW RtaW4iOnRydWUsImV 4cCI6MTUzODQ4NzAx OX0.7Z5HkE6K4eCLB Zp_TKfIFEs1PXhVMe9 B799Ao8dPMts
JWTの構成 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV CJ9.eyJuYW1lIjoiam9uIiwiYWRtaW4i OnRydWUsImV4cCI6MTUzODQ4NzA xOX0.7Z5HkE6K4eCLBZp_TKfIFEs1P XhVMe9B799Ao8dPMts { "alg": "HS256", "typ":
"JWT" } { "name": "jon", "admin": true, "exp": 1538487019 } 署名に使われる ハッシュ関数( base64UrlEncode(header) + "." + base64UrlEncode(payload), secret)
Golang-echoでの話 import ( "github.com/dgrijalva/jwt-go" "github.com/labstack/echo" "github.com/labstack/echo/middleware" ) func main(){ config
:= middleware.JWTConfig{ Claims: &jwtCustomClaims{}, SigningKey: []byte("secret"), } r.Use(middleware.JWTWithConfig(config)) } jwt-goを読み込んであげると使えるようになる
どこで有効? API-Sevice Outh-Sevice Service 認証情報 JWT
まとめ - サービスをまたぐときに有効 - golagもきちんとjwtに対応している