Understanding RSA signing for JWT

前端 未结 3 1575
忘掉有多难
忘掉有多难 2020-12-23 11:35

I\'m implementing a sign in system with the help of the JWT (JSON Web Token) scheme. Basically, after a user sign in / login, the server signs a JWT and passes it to the cli

3条回答
  •  自闭症患者
    2020-12-23 12:22

    Your suggestion:

    it make sense to sign the JWT with the public key which is sent to the client and verify it on the server side using the private key.

    is not correct. Signing is done with the private key of the sender, encryption is done with the public key of the receiver. That is how PKI works in general.

提交回复
热议问题