-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Intellij env file configuration for Oauth2 #275
Comments
@EiKeHe Yes, agree that you should implement the interface. I would have tried it before, but there was no documentation online at the time. But there is now. I'll have to see about installing an Intellij IDE again to extract the current interfaces from the JAR. |
Thanks for looking into it, @AnWeber! |
Maybe you can post the Api (.d.ts) of the $auth Object. You can view the Interface by navigating with mouseclick on the object (go to definition). In Intellij Idea some Resource of a http-client-plugin.jar was opened the last time I used this trick. |
Unfortunately that trick did not work for me so far but I will try again in the coming days. I had a look at the jar for the plugin and found the full json schemas for the envs and figured that they may be helpful, so I´m attaching them here. |
Almost. I checked my intellij idea installation on my work machine. In jar Found:-) stubs.zip Location: But not was I expected
|
I have been looking at the following version of the rest-client plugin: restClient-241.15989.49, which is the latest AFAIK. |
Turns out IntelliJ does not even support it yet in their own CLI tool 😁 |
Most flows should work, but only tested Password flow, but need to test all flows. I need to understand all properties of the Intellij Auth Config and try to support most of it. And support for ID Token is missing at the moment. not supported props:
|
I release support for Intellij OAuth2 with v6.13 |
Thanks a lot for the implementation! |
@EiKeHe, did you test it with success ? I'm using httpYac 6.14.0 and seems to be have exactly the same error as you initially : The weird thing is that it seems to detect the authentification file : when I run the query, the authentification process does run. But after I login, it redirect back to my editor and then the error appear. I also noticed that the Redirect URL that I provide is ignored, and |
@Laurent-PRP, yes, I was able to test it successfully and for me at least working via the httpyac VS code plugin I am still able to successfully send the requests we specified using OAUTH2 and the Intellji HTTP Client env files. Admittedly I am not using any redirect and therefor never tested that case. |
Hi @AnWeber, first of all thanks a lot for providing the plugin with all its features!
Relatively recently IntelliJ has introduced Oauth2 support for the http-client in IntelliJ Ultimate.
The public env file can now be configured according to this documentation:
https://www.jetbrains.com/help/idea/oauth-2-0-authorization.html#create-authentication-configuration
I've been trying to get this new configuration to be correctly recognized by httpyac and authorize my requests accordingly but so far have not been successful.
My public env.json file is structured like this:
My private env.json file is structured like this:
The authorization of my requests is according to the IntelliJ documentation and looks like this:
When I run my requests like this, I get the following error message: $auth is not defined
Am I missing something in the documentation, that points out how to configure auth with this kind of structure for my env.json files?
If I understand the docs here: https://httpyac.github.io/guide/variables.html#oauth2-openid-connect correctly I would have to change my authorization for each request and change the structure of my private env.json file when switching from IntelliJ to using VS Code with httpyac?
The text was updated successfully, but these errors were encountered: