cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a JWT token directly in the API definition

kimmie
Visitor

How to set a JWT token directly in the API definition

I've set up my bearer authentication:

  "components": {
   "securitySchemes": {
      "auth": {
        "type": "http",
        "scheme": "bearer",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "auth": []
    }
  ],

But it's a bit complicated to get the token, so I'd like to get it manually and put it directly in my api definition (just for running some automated tools). I haven't seen a way to do this.

I was thinking if I really need to give a URL for the token, I could just put it in a file and point to the file in the tokenUrl. Would that work? What would I need to set authorizationUrl to?

Thanks.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors