Jsonwebtoken Favorite Blog Address

Source: Internet
Author: User

This thing is not very understand, but looked up a bit of information, probably know what, specifically how to nest to specific needs to implement the function inside, this span is still a bit large,

First the blog address to the collection.

Here is the Java version of the example

Reference to Jane's book

JS Example

GitHub Project Code

RFC protocol English Documentation

Single Sign-on solution

In general, large applications will separate the logic of authorization from the logic of user information into one application, called the User Center.
The User Center does not process business logic, but only handles the management of user information and authorizes third-party applications. When a third-party application needs to log in, the user's login request is forwarded to the User Center for processing, the user processes the return voucher, the third-party application validates the credentials, and the user is logged on.

Jc_huang
Links: https://www.jianshu.com/p/613e44d4a464
Source: Pinterest
The copyright of the book is owned by the author, and any form of reprint should be contacted by the author for authorization and attribution. The certification process for JWT
    1. User login system;
    2. Server-side authentication, which encrypts the authentication information through a specified algorithm (for example, HS256), such as encrypting the user name and the user-owned role, encrypting the private key to the client side, and sending the encrypted result to the clients, the encrypted string format is three "." Delimited string tokens, corresponding to the header , load and signature, both the head and the load can be decoded by Base64, the signature part cannot be;
    3. The client gets the Token returned, which is stored in the local storage or the native database;
    4. The next time the client initiates the request, the Token is appended to the header;
    5. The server obtains tokens in the header, uses the same algorithm to authenticate the user name and the owning role in token, and if the validation result is the same, the request is normal and not tampered with. This process may not involve querying Redis or other storage at all;

Jsonwebtoken Favorite Blog Address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.