Skip to content

Commit

Permalink
Authentication URL doesn't embed path anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
azito-ct committed May 24, 2024
1 parent d81e2b2 commit 76efe06
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class BrunoModuleRenderer(val api: Api, override val vrapTypeProvider: VrapTypeP
**:warning: Be aware that postman automatically synchronizes environment variables (including your API client credentials) to your workspace if logged in.
Use this collection only for development purposes and non-production projects.**
To use this collection in Postman please perform the following steps:
To use this collection in Bruno please perform the following steps:
1. Download and install the Bruno Client
1. Fork the repository
Expand All @@ -67,10 +67,11 @@ class BrunoModuleRenderer(val api: Api, override val vrapTypeProvider: VrapTypeP
is StringInstance -> sdkBaseUri.value
else -> api.baseUri.template
}.trimEnd('/')

return TemplateFile(relativePath = "environments/Example.bru",
content = """
|vars {
| authUrl: ${api.oAuth2().uri().toString().trimEnd('/')}
| authUrl: https://${api.oAuth2().uri().host}
| apiUrl: $baseUri
| project-key:
|}
Expand Down Expand Up @@ -107,7 +108,7 @@ class BrunoModuleRenderer(val api: Api, override val vrapTypeProvider: VrapTypeP
return TemplateFile(relativePath = "environments/DotEnv.bru",
content = """
|vars {
| authUrl: ${api.oAuth2().uri().toString().trimEnd('/')}
| authUrl: https://${api.oAuth2().uri().host}
| apiUrl: $baseUri
| project-key:
| ctp_client_id: {{process.env.CTP_CLIENT_ID}}
Expand Down Expand Up @@ -164,7 +165,7 @@ class BrunoModuleRenderer(val api: Api, override val vrapTypeProvider: VrapTypeP
|}
|
|post {
| url: {{authUrl}}
| url: {{authUrl}}/oauth/token
| body: formUrlEncoded
| auth: basic
|}
Expand Down

0 comments on commit 76efe06

Please sign in to comment.