mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
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>
This commit is contained in:
committed by
GitHub
parent
36d72d9670
commit
cf433b58e5
@@ -301,7 +301,10 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
})();
|
||||
|
||||
const authentication: typeof vscode.authentication = {
|
||||
getSession(providerId: string, scopes: readonly string[], options?: vscode.AuthenticationGetSessionOptions) {
|
||||
getSession(providerId: string, scopesOrChallenge: readonly string[] | vscode.AuthenticationSessionRequest, options?: vscode.AuthenticationGetSessionOptions) {
|
||||
if (!Array.isArray(scopesOrChallenge)) {
|
||||
checkProposedApiEnabled(extension, 'authenticationChallenges');
|
||||
}
|
||||
if (
|
||||
(typeof options?.forceNewSession === 'object' && options.forceNewSession.learnMore) ||
|
||||
(typeof options?.createIfNone === 'object' && options.createIfNone.learnMore)
|
||||
@@ -311,7 +314,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
if (options?.authorizationServer) {
|
||||
checkProposedApiEnabled(extension, 'authIssuers');
|
||||
}
|
||||
return extHostAuthentication.getSession(extension, providerId, scopes, options as any);
|
||||
return extHostAuthentication.getSession(extension, providerId, scopesOrChallenge, options as any);
|
||||
},
|
||||
getAccounts(providerId: string) {
|
||||
return extHostAuthentication.getAccounts(providerId);
|
||||
|
||||
Reference in New Issue
Block a user