Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

REST APIについて考えたことメモ

More than 1 year has passed since last update.

前提として、REST APIではステートレスな設計が正とされている

認証にセッションを使う→ステートフル
(サーバー側でuserのセッションに対応する情報を保持していしまっているため)

認証にトークンを使う→ステートレス
(サーバー側ではトークンに含まれるuser情報を使用するため)

参考

https://developer.ntt.com/ja/blog/bcda1300-6cce-4e1c-b2ec-08e1ff441e42
https://qiita.com/pinekta/items/d10c8374b1a3003cd952
https://www.glamenv-septzen.net/view/1350
https://norikone.hatenablog.com/entry/2018/08/08/Web%E8%AA%8D%E8%A8%BC%E3%81%AB%E3%81%8A%E3%81%91%E3%82%8BToken%28JWT%29%E3%81%A8Cookie%28%E3%82%BB%E3%83%83%E3%82%B7%E3%83%A7%E3%83%B3%29%E3%81%AE%E9%81%95%E3%81%84

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away