auth token generation in IntelliJ http client

Answered

We have a custom intranet endpoint to generate auth token for all of our services. So to use http client we always have to write two api one to generate token and using that token to call second api for actual functionality.

is there a way I can call token api in pre request script to avoid duplicating the token call all the time. 

we cannot store token in variable as userid or scope will be different for each api

1
2 comments

It is possible for OAuth2 since the recent EAP builds. Please see https://blog.jetbrains.com/idea/2023/10/intellij-idea-2023-3-eap-3/#oauth-2.0-support

EAP version can be downloaded from https://www.jetbrains.com/idea/nextversion 

If it is some kind of custom auth protocol, then I afraid it is not possible right now. There is an issue about mechanism that can achieve such behavior: https://youtrack.jetbrains.com/issue/IDEA-297808

1

Thanks Egor Klepikov  voted for this functionality as this is very critical to make our automation solution using http client cli cleaner.

0

Please sign in to leave a comment.