desktop
desktop copied to clipboard
Add support for $$.env variables in the OAuth2 access token fetcher
The host name for our REST API is used as a tenant descriminator. So every user would use the API with a special hostname that limits access to his/her data.
So it would be great if each user could also issue test requests in the API reference using his/her host.
I can use env variable in the host
field of my OpenAPI spec to allow this.
The problem is that also the oauth2 authorizationUrl
and tokenUrl
would need to use this custom host as well to make it work for us. I tried also to use the host variable $$.env.host}
in e.g. the tokenUrl
.
But in the hub the varable expression this is not replaced:
Variable replaced for test request:
Variable not replaced in Get Access Token
overlay:
We don't have support for env variables here for right now, but we've got this tracked and will try to include it in one of the upcoming sprints.
+1 ! It's really strange that you can setup environments, but you can't authenticate to them because it doesn't support the env variables. :disappointed: