Daily Blog - Chat about Session, cookie, JWT, token, SSO, OAuth 2.0

Insert image description here


Overview

When it comes to authentication and session management for web applications, here are some important concepts:

  1. Session :

    • A session is a server-side data storage mechanism used to track user interactions with a website. Whenever a user visits a website, the server creates a unique session identifier, usually a session ID. This identification is stored on the server regardless of the user's browser.
    • Sessions are used to store a user's authentication status and other related information in order to maintain the user's state during their interaction with the website.
  2. Cookie(HTTP Cookie)

    • A cookie is a small piece of text information that is sent from a server to the user's browser, and then stored by the browser. Whenever a user requests a page associated with the same domain name, the browser sends the cookie back to the server so that the server can identify the user.
    • Cookies are commonly used to store session identifiers, user preferences, and other temporary data to improve the user experience.
  3. JWT(JSON Web Token)

    • JWT is a lightweight token used to securely transfer information between web applications. It is encoded and signed in JSON format, allowing information to be transferred securely between different systems.
    • JWT can be used for authentication, authorization, and data transfer, often in conjunction with OAuth 2.0.
  4. Token :

    • A token is a string that represents user identity or authorization information. In authentication and authorization processes, tokens are often used to prove a user's identity or to obtain authorization for a resource.
    • Tokens can be of many different types, including access tokens, refresh tokens, identity tokens, etc.
  5. SSO (Single Sign-On) :

    • SSO is an authentication method that allows users to log in once and then access multiple associated applications or services without having to enter credentials each time.
    • SSO reduces the password management burden on users while improving security and user experience.
  6. OAuth 2.0

    • OAuth 2.0 is an open-standard authorization protocol for authorizing third-party applications to access protected resources without exposing the user's credentials.
    • OAuth 2.0 is commonly used for authorization and token management, allowing users to authorize third-party applications to access their data without sharing their passwords.
    • Common applications of OAuth 2.0 include social login (such as logging in with Google or Facebook) and API access authorization.

These concepts are important when building modern web applications and authentication systems, choosing the appropriate way to manage user identity and authorization based on specific needs and security requirements.


Illustration

Insert image description here

Illustration of OAuth2.0

Insert image description here

Guess you like

Origin blog.csdn.net/yangshangwei/article/details/132834524