Skip to content

Commit

Permalink
Add built-in support for Oidc tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexF4Dev committed Jul 10, 2024
1 parent e7f1635 commit 33b7d8a
Show file tree
Hide file tree
Showing 8 changed files with 944 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ REST Client allows you to send HTTP request and view the response in Visual Stud
+ `{{$processEnv [%]envVarName}}`
+ `{{$dotenv [%]variableName}}`
+ `{{$aadToken [new] [public|cn|de|us|ppe] [<domain|tenantId>] [aud:<domain|tenantId>]}}`
+ `{{$oidcAccessToken [new] [<clientId:<clientId>] [<callbackPort:<callbackPort>] [authorizeEndpoint:<authorizeEndpoint}] [tokenEndpoint:<tokenEndpoint}] [scopes:<scopes}] [audience:<audience}]}`
- Easily create/update/delete environments and environment variables in setting file
- File variables can reference both custom and system variables
- Support environment switch
Expand Down Expand Up @@ -586,6 +587,22 @@ System variables provide a pre-defined set of variables that can be used in any

`clientId:<clientid>`: Optional. Identifier of the application registration to use to obtain the token. Default uses an application registration created specifically for this plugin.

* `{{$oidcAccessToken [new] [<clientId:<clientId>] [<callbackPort:<callbackPort>] [authorizeEndpoint:<authorizeEndpoint}] [tokenEndpoint:<tokenEndpoint}] [scopes:<scopes}] [audience:<audience}]}`: Add an Oidc Identity Server token based on the following options (must be specified in order):

`new`: Optional. Specify `new` to force re-authentication and get a new token for the client. Default: Reuse previous token for clientId from an in-memory cache. Expired tokens are refreshed automatically. (Restart Visual Studio Code to clear the cache.)

`clientId:<clientid>`: Optional. Identifier of the application registration to use to obtain the token.

`callbackPort:<callbackPort>`: Optional. Port to use for the local callback server. Default: 7777 (random port).

`authorizeEndpoint:<authorizeEndpoint>`: The authorization endpoint to use.

`tokenEndpoint:<tokenEndpoint>`: The token endpoint to use.

`scopes:<scope[,]>`: Optional. Comma delimited list of scopes that must have consent to allow the call to be successful.

`audience:<audience>`: Optional.

* `{{$guid}}`: Add a RFC 4122 v4 UUID
* `{{$processEnv [%]envVarName}}`: Allows the resolution of a local machine environment variable to a string value. A typical use case is for secret keys that you don't want to commit to source control.
For example: Define a shell environment variable in `.bashrc` or similar on windows
Expand Down
Loading

0 comments on commit 33b7d8a

Please sign in to comment.