Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Paw app with JWT

Tags:

jwt

paw-app

I have an API that I've built that uses JWT for authorization. How would I go about generating an appropriate JWT using Paw? I could just write a simple app to take in all my info and spit out a JWT, but I would rather be able to put the info in Paw somehow and have it generate the JWT and send it to the API.

like image 843
Jon Carl Avatar asked Jul 05 '15 01:07

Jon Carl


People also ask

Can mobile apps use JWT?

To retrieve the User Profile, your mobile application can decode the ID Token using one of the JWT libraries. This is done by verifying the signature and verifying the claims of the token.

Can we use JWT for Web application?

JWT is a common way of implementing authentication in web and mobile apps. Read more to know how you can use JWT and learn the necessary best practices. One of the most used authentication standards in web applications is the JSON Web Token standard.

Can I use JWT as API key?

Any API that requires authentication can easily switch over to JWT's authorization. With JWT authorization, you get a user-based authentication. Once the user is authenticated, the user gets a secure token that they can use on all systems. The management of the user (and therefore the token) is centralized.

Can you use Oauth with JWT?

JWT and OAuth2 are entirely different and serve different purposes, but they are compatible and can be used together. The OAuth2 protocol does not specify the format of the tokens, therefore JWTs can be incorporated into the usage of OAuth2.


2 Answers

You can add an header name Authorization and add the OAuth 2 Autorization in header value.

Then you need put your token at Token - Bearer field. (The selected field in the image bellow.)

Paw

like image 149
monteirobrena Avatar answered Jan 03 '23 23:01

monteirobrena


The answer to this was staring me in the face since Paw is so powerful. I just used a dynamic value of my login call that produces the JWT. Now my JWT gets included in my headers automatically. More info can be found here: https://luckymarmot.com/paw/doc/Response_Parsed_Body_Dynamic_Value

like image 34
Jon Carl Avatar answered Jan 04 '23 00:01

Jon Carl