Commit Graph

22 Commits

Author SHA1 Message Date
Tyler James Leonhardt
a3fcd46091 Remove web worker support from microsoft-authentication extension (#276762)
* Initial plan

* Remove web worker support from microsoft-authentication extension

- Remove browser entry point from package.json
- Remove browser webpack configuration
- Remove browser-specific scripts (compile-web, watch-web)
- Remove src/browser/ directory with browser-specific implementations
- Remove ExtensionHost.WebWorker enum value
- Remove supportsWebWorkerExtensionHost flags from all flows
- Simplify authProvider.ts by removing web worker detection logic
- Remove web worker test case from flows.test.ts
- Successfully compiled with 0 errors

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* couple references

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-11-11 11:09:39 -08:00
Tyler James Leonhardt
bf0fa4c73f Finalize idToken API (#274464)
Fixes https://github.com/microsoft/vscode/issues/140929
2025-11-03 10:25:57 +01:00
Matt Bierner
f197aadde1 Fix output for microsoft-authentication
For #271167

All out of extensions normally target `out`. `dist` is for webpack
2025-10-13 16:52:33 -07:00
Matt Bierner
97b2c007cd Migrate fully of moduleResolution node10
Fixes #265420
2025-09-09 11:08:41 -07:00
Matt Bierner
c67f8834a7 Adding a few more ignoreDeprecations 2025-09-05 14:48:25 -07:00
Tyler James Leonhardt
cf433b58e5 Ability to pass down WWW-Authenticate challenges down to Auth Providers (#261717)
* Initial plan

* Implement authentication challenges support for mandatory MFA

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* Add documentation and integration test for authentication challenges

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* Add validation script and finalize implementation

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* Update authentication challenges API to use AuthenticationConstraint interface

Co-authored-by: TylerLeonhardt <2644648+TylerLeonhardt@users.noreply.github.com>

* Get it compiling... who knows if it works

* New parseWWWAuthenticateHeader behavior

* works

* let's go with this for now

* Good shape

* bye

* final polish

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-08-14 18:10:05 -07:00
Matt Bierner
d8c9852fe9 Don't use experimental decorators in extensions
Seeing if we can compile our extensions using TS native which doesn't support these. The usage is so low that I think we can just remove them
2025-08-06 13:24:19 -07:00
Tyler James Leonhardt
86efdcd2c1 Introduce Issuer handling in the Authentication stack (#248948)
Mostly plumbing... this enables:
```
vscode.authentication.getSession('microsoft', scopes, { issuer: "https://login.microsoftonline.com/common/v2.0" });
```
And the respective API for an auth providers to handle it being passed in.

This props up work in MCP land which needs a way to map an issuer to an auth provider... but I certainly see utility outside of that space.

Fixes https://github.com/microsoft/vscode/issues/248775#issuecomment-2876711396
2025-05-14 23:02:15 +02:00
Tyler James Leonhardt
305134296c Adopt the MSAL broker to talk to the OS for Microsoft auth (#233739)
This adopts the `NativeBrokerPlugin` provided by `@azure/msal-node-extensions` to provide the ability to use auth state from the OS, and show native auth dialogs instead of going to the browser.

This has several pieces:
* The adoption of the broker in the microsoft-authentication extension:
  * Adding `NativeBrokerPlugin` to our PCAs
  * Using the proposed handle API to pass the native window handle down to MSAL calls (btw, this API will change in a follow up PR)
  * Adopting an AccountAccess layer to handle:
    * giving the user control of which accounts VS Code uses
    * an eventing layer so that auth state can be updated across multiple windows
* Getting the extension to build properly and only build what it really needs. This required several package.json/webpack hacks:
  * Use a fake keytar since we don't use the feature in `@azure/msal-node-extensions` that uses keytar
  * Use a fake dpapi layer since we don't use the feature in  `@azure/msal-node-extensions` that uses it
  * Ensure the msal runtime `.node` and `.dll` files are included in the bundle
* Get the VS Code build to allow a native node module in an extension: by having a list of native extensions that will be built in the "ci" part of the build - in other words when VS Code is building on the target platform

There are a couple of followups:
* Refactor the `handle` API to handle (heh) Auxiliary Windows https://github.com/microsoft/vscode/issues/233106
* Separate the call to `acquireTokenSilent` and `acquireTokenInteractive` and all the usage of this native node module into a separate process or maybe in Core... we'll see. Something to experiment with after we have something working. NEEDS FOLLOW UP ISSUE

Fixes https://github.com/microsoft/vscode/issues/229431
2024-11-15 20:53:28 +09:00
Tyler James Leonhardt
02b638ae27 Finalize getAccounts API (#224877)
Fixes https://github.com/microsoft/vscode/issues/152399
2024-08-05 11:59:33 -07:00
Tyler James Leonhardt
5d7157cb03 Implement getAccounts API over getSessions (#215874)
And plumb that through to the Microsoft auth provider
2024-06-16 18:12:37 -07:00
Sandeep Somavarapu
2cd8ea24f2 #159892 Finalize (#165925) 2022-11-09 10:28:27 -05:00
Sandeep Somavarapu
35c7ee9d02 Support log output channels for extensions (#161249)
* introduce log api in extension context

* separate registering output vs log channel

* Separate extension log channels in show logs command

* add logging error to embedder logger

* show extension log in the extension editor

* configure log level per extension

* change the order of log entries

* introduce logger

* align with output chanel

* revert changes

* fixes
2022-09-19 09:03:41 -07:00
Tyler Leonhardt
f728c9289e use global URLSearchParams 2022-03-18 14:52:18 -07:00
Tyler Leonhardt
9403de257a proposed api for an idToken on AuthenticationSession. ref #140929 2022-01-24 20:02:31 -08:00
Johannes Rieken
09c9d4c293 use enabledApiProposals instead of wildcard property, also update compilation units to only include d.ts-files that are needed, https://github.com/microsoft/vscode/issues/131165 2021-11-12 11:05:57 +01:00
Johannes Rieken
a4d426a1c2 split vscode.proposed.d.ts into a file per proposal, https://github.com/microsoft/vscode/issues/131165 2021-11-12 09:48:17 +01:00
Johannes Rieken
68e819043c use tsconfig.json#include for vscode.d.ts and vscode.proposed.d.ts, enables to remove most ref.d.ts-files 2021-11-09 15:53:35 +01:00
Matt Bierner
0ec29f0fcf Pick up TS 4.4@next for building
- Disables the two new strictness options for now
- Adopt shared tsconfig for `microsoft-authentication `
2021-06-07 14:44:24 -07:00
Matt Bierner
c0885dd0c4 Add task to build extension media (#119294)
This lets us avoid checking in the compiled js files that are used inside webviews and notebooks
2021-03-18 19:15:59 -07:00
Rachel Macfarlane
0d1933a322 Add webworker support for microsoft authentication extension 2020-07-16 15:21:23 -07:00
Rachel Macfarlane
9559d186d4 Rename vscode-account extension to microsoft-authentication 2020-05-13 09:41:42 -07:00