What is the difference between JSON Web Signature (JWS) and JSON Web Token (JWT)?

前端 未结 2 843
萌比男神i
萌比男神i 2021-02-01 12:13

I\'ve been coding a RESTful service in Java. This is what I\'ve understood till now (correct me if i\'m wrong):

Token authorization is done using JSON Web Tokens (JW

2条回答
  •  误落风尘
    2021-02-01 12:57

    To put simply, JWT (JSON Web Token) is a way of representing claims which are name-value pairs into a JSON object. JWT spec defines a set of standard claims to be used or transferred between two parties.

    On the other hand, JWS (JSON Web Signature) is a mechanism for transferring JWT payload between two parties with guarantee for Integrity. JWS spec defines multiple ways of signing (eg. HMAC or digital signature) the payload and multiple ways of serializing the content to transfer across network.

提交回复
热议问题