Sending JWT token in the headers with Postman

后端 未结 12 1740
借酒劲吻你
借酒劲吻你 2020-12-07 07:38

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 ho

相关标签:
12条回答
  • 2020-12-07 07:46

    Somehow postman didn't work for me. I had to use a chrome extension called RESTED which did work.

    0 讨论(0)
  • 2020-12-07 07:51

    Here is how to set token this automatically

    On your login/auth request

    Then for authenticated page

    0 讨论(0)
  • 2020-12-07 07:51

    If you wish to use postman the right way is to use the headers as such

    key: Authorization

    value: jwt {token}

    as simple as that.

    0 讨论(0)
  • 2020-12-07 07:54

    For people who are using wordpress plugin Advanced Access Manager to open up the JWT Authentication.

    The Header field should put Authentication instead of Authorization

    AAM mentioned it inside their documentation,

    Note! AAM does not use standard Authorization header as it is skipped by most Apache servers. ...


    Hope it helps someone! Thanks for other answers helped me alot too!!

    0 讨论(0)
  • 2020-12-07 07:54

    In Postman latest version(7++) may be there is no Bearer field in Authorization So go to Header tab

    select key as Authorization and in value write JWT

    0 讨论(0)
  • 2020-12-07 07:55

    I had the same issue in Flask and after trying the first 2 solutions which are the same (Authorization: Bearer <token>), and getting this:

    {
        "description": "Unsupported authorization type",
        "error": "Invalid JWT header",
        "status_code": 401
    }
    

    I managed to finally solve it by using:

    Authorization: jwt <token>
    

    Thought it might save some time to people who encounter the same thing.

    0 讨论(0)
提交回复
热议问题