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について_基本編
Search
魔迦論
April 30, 2025
33
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JWTについて_基本編
JWTとは
セッションID方式との違い
など
随時更新予定
魔迦論
April 30, 2025
More Decks by 魔迦論
See All by 魔迦論
GitHub Actionsのハンズオン
mackalong
0
46
英文の読み方
mackalong
0
34
OpenAPIについて
mackalong
0
34
useSWRについて
mackalong
0
21
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
So, you think you're a good person
axbom
PRO
2
2.2k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Accessibility Awareness
sabderemane
1
250
Odyssey Design
rkendrick25
PRO
2
880
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Side Projects
sachag
456
43k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
The Cult of Friendly URLs
andyhume
79
7k
Transcript
JWT(JSON Web Token)について 基本編
はじめに 本スライドは、JWTについて個人的な学びのためにまとめたものである JWTが良いとか悪いとかは述べない。そのレベルの理解はまだできていない JWTに関する議論はネット上に色々あるので気になった人は調べてみると面 白いと思う 上記の議論などをよく読んで理解が深まれば、JWTのメリット/デメリットなどの 更新する予定
前提 : 認証と認可(簡単に) 認証(Authentication) 「このリクエストは正規のユーザー"Aさん"からのリクエストだ」と言うことを認 めて証明する 身元確認 認可(Authorization) Aさんに特定リソースへのアクセスを許可する
JWTとは 概念 認証後の認証状態を保持・証明する手段として使われていることが多い 認証そのものではないと言う認識 同レイヤーの仕組みとしては、セッションIDがある 実体 <Header>.<Payload>.<Signature> Header : 署名アルゴリズム(共通鍵、公開鍵)を格納
Payload : ユーザーIDやトークンの情報を格納 Signature : "Header.Payload"に対して秘密鍵を使って生成されたデジタル署名 つまり、鍵で検証が可能になる
ログイン認証 -> セッションID 初回リクエスト
ログイン後リクエスト
ログイン認証 -> JWT 初回リクエスト
ログイン後リクエスト