Skip to content

Commit bed691a

Browse files
authored
Add built-in support for Oidc tokens (#1282)
* Add built-in support for Oidc tokens * Added support for google clientId and improved error handling Added support for google clientId and improved error handling * Added https callback support * added default scopes to settings * fixed regex * fixed lint * added html sanitize and cleanup formatting
1 parent f04c419 commit bed691a

File tree

9 files changed

+1120
-4
lines changed

9 files changed

+1120
-4
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ REST Client allows you to send HTTP request and view the response in Visual Stud
4040
+ `{{$processEnv [%]envVarName}}`
4141
+ `{{$dotenv [%]variableName}}`
4242
+ `{{$aadToken [new] [public|cn|de|us|ppe] [<domain|tenantId>] [aud:<domain|tenantId>]}}`
43+
+ `{{$oidcAccessToken [new] [<clientId:<clientId>] [<callbackPort:<callbackPort>] [authorizeEndpoint:<authorizeEndpoint}] [tokenEndpoint:<tokenEndpoint}] [scopes:<scopes}] [audience:<audience}]}`
4344
- Easily create/update/delete environments and environment variables in setting file
4445
- File variables can reference both custom and system variables
4546
- Support environment switch
@@ -586,6 +587,22 @@ System variables provide a pre-defined set of variables that can be used in any
586587

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

590+
* `{{$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):
591+
592+
`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.)
593+
594+
`clientId:<clientid>`: Optional. Identifier of the application registration to use to obtain the token.
595+
596+
`callbackPort:<callbackPort>`: Optional. Port to use for the local callback server. Default: 7777 (random port).
597+
598+
`authorizeEndpoint:<authorizeEndpoint>`: The authorization endpoint to use.
599+
600+
`tokenEndpoint:<tokenEndpoint>`: The token endpoint to use.
601+
602+
`scopes:<scope[,]>`: Optional. Comma delimited list of scopes that must have consent to allow the call to be successful.
603+
604+
`audience:<audience>`: Optional.
605+
589606
* `{{$guid}}`: Add a RFC 4122 v4 UUID
590607
* `{{$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.
591608
For example: Define a shell environment variable in `.bashrc` or similar on windows

0 commit comments

Comments
 (0)