使用Postman在标头中发送JWT令牌 [英] Sending JWT token in the headers with Postman
问题描述
I'm testing an implementation of JWT Token based security based off the following article. I have successfully received a token from the test server. I can't figure out how to have the Chrome POSTMAN REST Client program send the token in the header.
我的问题如下:
1)我是否使用正确的标题名称和/或POSTMAN接口?
1) Am I using the right header name and/or POSTMAN interface?
2)我是否需要基于64位编码令牌?我以为我可以将令牌寄回去.
2) Do I need to base 64 encode the token? I thought I could just send the token back.
推荐答案
对于请求标头名称,只需使用授权即可. 将Bearer放置在令牌之前.我只是尝试了一下,对我有用.
For the request Header name just use Authorization. Place Bearer before the Token. I just tried it out and it works for me.
授权:承载TOKEN_STRING
Authorization: Bearer TOKEN_STRING
JWT的每个部分都是base64url编码的值.
Each part of the JWT is a base64url encoded value.
这篇关于使用Postman在标头中发送JWT令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!