Skip to content

Commit

Permalink
fix: allow proxy for oauth2 using oauth2_proxy (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Jan 11, 2025
1 parent 8cbc1ea commit 1889adf
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

## [6.16.6] (2025-01-11)

### Fix
- allow proxy for oauth2 using `oauth2_proxy` (#841)

## [6.16.5] (2025-01-06)

### Features
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "MIT",
"publisher": "AnWeber",
"description": "HTTP/REST CLI Client for *.http files",
"version": "6.16.5",
"version": "6.16.6",
"homepage": "https://github.com/AnWeber/httpyac",
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions src/models/openIdInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface OpenIdConfiguration {
keepAlive?: boolean;
username?: string | null;
password?: string | null;
proxy?: string | null;
subjectIssuer?: string | null;
useAuthorizationHeader?: boolean;
useDeviceCodeClientSecret?: boolean;
Expand Down
1 change: 1 addition & 0 deletions src/plugins/oauth2/flow/requestOpenIdInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export async function addConfigRequestOptions(
context: models.OpenIdContext
) {
if (utils.isProcessorContext(context)) {
request.proxy = config.proxy || undefined;
if (context.config?.request?.rejectUnauthorized !== undefined) {
request.noRejectUnauthorized = !utils.toBoolean(context.config?.request?.rejectUnauthorized);
}
Expand Down
1 change: 1 addition & 0 deletions src/plugins/oauth2/openIdConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function getOpenIdConfiguration(
resource: getArrayOrString('resource'),
username: getString('username'),
password: getString('password'),
proxy: getString('proxy'),
subjectIssuer: getString('subjectIssuer') || undefined,
redirectUri: getUrl('redirectUri', DEFAULT_CALLBACK_URI),
keepAlive: getBoolean('keepAlive', true),
Expand Down

0 comments on commit 1889adf

Please sign in to comment.