Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: merge main to dev after release #393

Merged
merged 5 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .config/1espt/PipelineAutobaseliningConfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## DO NOT MODIFY THIS FILE MANUALLY. This is part of auto-baselining from 1ES Pipeline Templates. Go to [https://aka.ms/1espt-autobaselining] for more details.

pipelines:
25050:
retail:
source:
credscan:
lastModifiedDate: 2025-01-14
eslint:
lastModifiedDate: 2025-01-14
psscriptanalyzer:
lastModifiedDate: 2025-01-14
armory:
lastModifiedDate: 2025-01-14
binary:
credscan:
lastModifiedDate: 2025-02-17
binskim:
lastModifiedDate: 2025-02-17
spotbugs:
lastModifiedDate: 2025-02-17
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

All notable changes to the "Azure Api Management VS Code" extension will be documented in this file.

## 1.0.10

### Updates
- Remove the dependency to Azure Account extension

## 1.0.9

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ Follow instructions [here](https://github.com/microsoft/vscode-apimanagement/iss

## Managing Azure Subscriptions

If you are not signed in to Azure, you will see a "Sign in to Azure..." link. Alternatively, you can select "View->Command Palette" in the VS Code menu, and search for "Azure: Sign In".
If you are not signed in to Azure, a 'Sign in to Azure...' link will appear.

If you don't have an Azure Account, you can sign up for one today for free and receive $200 in credits by selecting "Create a Free Azure Account..." or selecting "View->Command Palette" and searching for "Azure: Create an Account".
If you don't have an Azure Account, you can sign up for one today for free and receive $200 in credits by selecting "Create a Free Azure Account...", or select "Create an Azure for Students Account...".

You may sign out of Azure by selecting "View->Command Palette" and searching for "Azure: Sign Out".
To sign out of Azure in VSCode, go to the account page, select your Azure account, and click 'Sign Out'.

To select which subscriptions show up in the extension's explorer, click on the "Select Subscriptions..." button on any subscription node (indicated by a "filter" icon when you hover over it), or select "View->Command Palette" and search for "Azure: Select Subscriptions". Note that this selection affects all VS Code extensions that support the [Azure Account and Sign-In](https://github.com/Microsoft/vscode-azure-account) extension.
To switch tenants in VSCode, go to "View" -> "Command Palette" and search for "Azure API Management: Select Tenant...".

To choose which subscriptions appear in the extension's explorer, click the "Select Subscriptions..." button on any subscription node (indicated by a filter icon when you hover over it), or go to "View" -> "Command Palette" and search for "Azure API Management: Select Subscriptions".

## Contributing

Expand Down
184 changes: 183 additions & 1 deletion package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@
"@microsoft/vscode-azext-dev": "^2.1.0",
"@types/fs-extra": "^4.0.3",
"@types/gulp": "^4.0.6",
"@types/jsonwebtoken": "^9.0.8",
"@types/mocha": "^10.0.0",
"@types/node": "^8.10.59",
"@types/request": "^2.48.4",
Expand Down Expand Up @@ -873,6 +874,7 @@
"guid-typescript": "^1.0.9",
"gulp-decompress": "^3.0.0",
"gulp-download": "0.0.1",
"jsonwebtoken": "^9.0.2",
"opn": "^5.3.0",
"request": "^2.88.2",
"request-promise": "^4.2.5",
Expand All @@ -890,4 +892,4 @@
"overrides": {
"fsevents": "~2.3.2"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { AuthorizationTreeItem } from "../../explorer/AuthorizationTreeItem";
import { ext } from "../../extensionVariables";
import { localize } from "../../localize";
import { nonNullValue } from "../../utils/nonNull";
import * as jwt from "jsonwebtoken";

const systemAssignedManagedIdentitiesOptionLabel = "System assigned managed identity";
const userAssignedManagedIdentitiesOptionLabel = "User assigned managed identity";
Expand Down Expand Up @@ -154,9 +155,10 @@ async function populateIdentityOptionsAsync(

// 1. Self
const token = await credential.getToken();
const decoded = jwt.decode(token.token, { complete: true }) as any;
const meOption : QuickPickItem = {
label: nonNullValue(token.userId),
description: token.oid,
label: nonNullValue(decoded.payload!.unique_name!),
description: decoded.payload!.oid,
detail: "Current signedIn user"
};
options.push(meOption);
Expand Down
Loading