fix bruno-lang unit tests

This commit is contained in:
lohxt1
2025-03-16 14:24:04 +05:30
parent 71b6907c31
commit 5728b7c8a8
3 changed files with 26 additions and 11 deletions

View File

@@ -196,8 +196,8 @@ ${indentString(`token_placement: ${auth?.oauth2?.tokenPlacement || ''}`)}${
}${
auth?.oauth2?.tokenPlacement !== 'header' ? '\n' + indentString(`token_query_key: ${auth?.oauth2?.tokenQueryKey || ''}`) : ''
}
${indentString(`auto_fetch_token: ${(auth?.oauth2?.autoFetchToken).toString()}`)}
${indentString(`auto_refresh_token: ${(auth?.oauth2?.autoRefreshToken).toString()}`)}
${indentString(`auto_fetch_token: ${auth?.oauth2?.autoFetchToken?.toString?.()}`)}
${indentString(`auto_refresh_token: ${auth?.oauth2?.autoRefreshToken?.toString?.()}`)}
}
`;
@@ -221,8 +221,8 @@ ${indentString(`token_placement: ${auth?.oauth2?.tokenPlacement || ''}`)}${
}${
auth?.oauth2?.tokenPlacement !== 'header' ? '\n' + indentString(`token_query_key: ${auth?.oauth2?.tokenQueryKey || ''}`) : ''
}
${indentString(`auto_fetch_token: ${(auth?.oauth2?.autoFetchToken).toString()}`)}
${indentString(`auto_refresh_token: ${(auth?.oauth2?.autoRefreshToken).toString()}`)}
${indentString(`auto_fetch_token: ${auth?.oauth2?.autoFetchToken?.toString?.()}`)}
${indentString(`auto_refresh_token: ${auth?.oauth2?.autoRefreshToken?.toString?.()}`)}
}
`;
@@ -242,8 +242,8 @@ ${indentString(`token_placement: ${auth?.oauth2?.tokenPlacement || ''}`)}${
}${
auth?.oauth2?.tokenPlacement !== 'header' ? '\n' + indentString(`token_query_key: ${auth?.oauth2?.tokenQueryKey || ''}`) : ''
}
${indentString(`auto_fetch_token: ${(auth?.oauth2?.autoFetchToken).toString()}`)}
${indentString(`auto_refresh_token: ${(auth?.oauth2?.autoRefreshToken).toString()}`)}
${indentString(`auto_fetch_token: ${auth?.oauth2?.autoFetchToken.toString?.()}`)}
${indentString(`auto_refresh_token: ${auth?.oauth2?.autoRefreshToken.toString?.()}`)}
}
`;

View File

@@ -59,11 +59,18 @@ auth:oauth2 {
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
refresh_url:
client_id: client_id_1
client_secret: client_secret_1
scope: read write
state: 807061d5f0be
pkce: false
credentials_placement: body
credentials_id: credentials
token_placement: header
token_header_prefix: Bearer
auto_fetch_token: true
auto_refresh_token: true
}
body:json {

View File

@@ -74,15 +74,23 @@
"password": "secret"
},
"oauth2": {
"grantType": "authorization_code",
"accessTokenUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/token",
"authorizationUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/authorize",
"autoFetchToken": true,
"autoRefreshToken": true,
"callbackUrl": "http://localhost:8080/api/auth/oauth2/authorization_code/callback",
"clientId": "client_id_1",
"clientSecret": "client_secret_1",
"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",
"credentialsId": "credentials",
"credentialsPlacement": "body",
"grantType": "authorization_code",
"pkce": false,
"refreshUrl": "",
"scope": "read write",
"state": "807061d5f0be",
"pkce": false
"tokenHeaderPrefix": "Bearer",
"tokenPlacement": "header",
"tokenQueryKey": "access_token"
},
"wsse": {
"username": "john",