desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Add support for $$.env variables in the OAuth2 access token fetcher

Open mduesterhoeft opened this issue 6 years ago • 2 comments

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: image

Variable not replaced in Get Access Token overlay: image

mduesterhoeft avatar Oct 17 '18 12:10 mduesterhoeft

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.

tbarn avatar Oct 19 '18 21:10 tbarn

+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:

ydbondt avatar Jan 25 '19 10:01 ydbondt