insomnium icon indicating copy to clipboard operation
insomnium copied to clipboard

How to use authentication automation? Variables?

Open eabase opened this issue 2 years ago • 2 comments

Expected Behavior

I expect to be able to send an authentication request and get an authentication token, and that token get saved in a variable that can be used in subsequent requests.

Actual Behavior

No idea, you don't have any documentation

Reproduction Steps

.

Is there an existing issue for this?

Additional Information

No response

Insomnium Version

latest

What operating system are you using?

Windows

Operating System Version

Microsoft Windows 11 Enterprise (64-bit)

Installation method

download from here

Last Known Working Insomnium version

No response

eabase avatar Nov 03 '23 08:11 eabase

This Plugin can provide the functionality you described.

timozn avatar Nov 06 '23 07:11 timozn

You can use the response of another request to fill any information.

In the field where you want to use the response data press ctrlspace, then search for Response → Body Attribute A red dynamic variable will appear, click on it to open edition modal

  • In the dropdown Request pick your authentication request
  • In the Filter field, use a JSONPath like $ to select the entire body, or a $.accessToken if the token is inside a JSON object
  • With the dropdown Tigger Behavior you can tune what will do a call on your authentication request
  • Press the Done button

And voilà, you have transmitted a value between a parent/child (requirement/usage) request

MacFJA avatar Feb 22 '24 21:02 MacFJA