Skip to content

Commit

Permalink
feat: support client certificates on OAuth2 Requests (#802)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Oct 1, 2024
1 parent 83371ed commit b39a474
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [unreleased]
### Features
- support client certificates on OAuth2 Requests (#802)

## [6.15.1] ( 2024-08-22)
### Features
- prefix output with name as fallback for title (AnWeber/vscode-httpyac#318)
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/http/clientCertVariableReplacer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function clientCertVariableReplacer(
return text;
}

async function addClientCertificateForUrl(
export async function addClientCertificateForUrl(
urlString: string,
request: models.HttpRequest,
context: models.ProcessorContext
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/oauth2/flow/requestOpenIdInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { log } from '../../../io';
import * as io from '../../../io';
import type * as models from '../../../models';
import * as utils from '../../../utils';
import { addClientCertificateForUrl } from '../../http';

export async function requestOpenIdInformation(
request: models.HttpClientRequest | false,
Expand Down Expand Up @@ -66,6 +67,8 @@ export async function addConfigRequestOptions(
request.noRejectUnauthorized = !utils.toBoolean(context.config?.request?.rejectUnauthorized);
}

await addClientCertificateForUrl(request.url, request, context);

if (config.interceptRequest) {
await config.interceptRequest(request, context);
}
Expand Down

0 comments on commit b39a474

Please sign in to comment.