What's the difference between JWTs and Bearer Token?

后端 未结 3 1043
旧时难觅i
旧时难觅i 2020-12-04 06:35

I\'m learning something about Authorization like Basic, Digest, OAuth2.0, JWTs, and Bearer Token.

Now I have a question.

You know the JWTs is being used as

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 06:58

    JWT is an encoding standard for tokens that contains a JSON data payload that can be signed and encrypted.

    JWT can be used for many things, among those are bearer tokens, i.e. a piece of information that you can present to some service that by virtue of you having it (you being the "bearer") grants you access to something.

    Bearer tokens can be included in an HTTP request in different ways, one of them (probably the preferred one) being the Authorization header. But you could also put it into a request parameter, a cookie or the request body. That is mostly between you and the server you are trying to access.

提交回复
热议问题