From c4c8e2b00db3ca836ab9092b1680bdbe16e2ebcb Mon Sep 17 00:00:00 2001 From: Mateusz Pietryga Date: Thu, 25 Apr 2024 10:12:29 +0200 Subject: [PATCH] feat: OAuth 2.0 Client Credentials as Basic Auth - update test data #2106 --- packages/bruno-lang/v2/tests/fixtures/collection.bru | 12 ++++++++++++ .../bruno-lang/v2/tests/fixtures/collection.json | 11 +++++++++++ packages/bruno-lang/v2/tests/fixtures/request.bru | 1 + packages/bruno-lang/v2/tests/fixtures/request.json | 1 + 4 files changed, 25 insertions(+) diff --git a/packages/bruno-lang/v2/tests/fixtures/collection.bru b/packages/bruno-lang/v2/tests/fixtures/collection.bru index 44a66c8dc6..7de823d044 100644 --- a/packages/bruno-lang/v2/tests/fixtures/collection.bru +++ b/packages/bruno-lang/v2/tests/fixtures/collection.bru @@ -26,6 +26,18 @@ auth:digest { password: secret } +auth:oauth2 { + grant_type: authorization_code + callback_url: http://localhost:8080/api/auth/oauth2/authorization_code/callback + authorization_url: http://localhost:8080/api/auth/oauth2/authorization_code/authorize + access_token_url: http://localhost:8080/api/auth/oauth2/authorization_code/token + client_id: client_id_1 + client_secret: client_secret_1 + client_secret_method: client_credentials_post + scope: read write + pkce: false +} + vars:pre-request { departingDate: 2020-01-01 ~returningDate: 2020-01-02 diff --git a/packages/bruno-lang/v2/tests/fixtures/collection.json b/packages/bruno-lang/v2/tests/fixtures/collection.json index 7bda2534d9..e139548c99 100644 --- a/packages/bruno-lang/v2/tests/fixtures/collection.json +++ b/packages/bruno-lang/v2/tests/fixtures/collection.json @@ -31,6 +31,17 @@ "digest": { "username": "john", "password": "secret" + }, + "oauth2": { + "grantType": "authorization_code", + "clientId": "client_id_1", + "clientSecret": "client_secret_1", + "clientSecretMethod": "client_credentials_post", + "authorizationUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/authorize", + "callbackUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/callback", + "accessTokenUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/token", + "scope": "read write", + "pkce": false } }, "vars": { diff --git a/packages/bruno-lang/v2/tests/fixtures/request.bru b/packages/bruno-lang/v2/tests/fixtures/request.bru index fcfe7b8183..559802a5b1 100644 --- a/packages/bruno-lang/v2/tests/fixtures/request.bru +++ b/packages/bruno-lang/v2/tests/fixtures/request.bru @@ -52,6 +52,7 @@ auth:oauth2 { access_token_url: http://localhost:8080/api/auth/oauth2/authorization_code/token client_id: client_id_1 client_secret: client_secret_1 + client_secret_method: client_credentials_basic scope: read write pkce: false } diff --git a/packages/bruno-lang/v2/tests/fixtures/request.json b/packages/bruno-lang/v2/tests/fixtures/request.json index afb7ca3f90..59bed06fdf 100644 --- a/packages/bruno-lang/v2/tests/fixtures/request.json +++ b/packages/bruno-lang/v2/tests/fixtures/request.json @@ -68,6 +68,7 @@ "grantType": "authorization_code", "clientId": "client_id_1", "clientSecret": "client_secret_1", + "clientSecretMethod": "client_credentials_basic", "authorizationUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/authorize", "callbackUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/callback", "accessTokenUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/token",