Refreshes token for intellisense (#19214)

* wip

* wip

* wip

* working refresh token for intellisense

* pr review comments

* pr review comments

* add link

* pr comments

* change authority -> tenantId

* refactor tenant

* fix build

* add js doc comments, other pr changes

* fix error messaging

* add log

* added logs

* remove expiresOn

* fix error messaging

* pr comments

* remove localized strings from logs
This commit is contained in:
Christopher Suh
2022-05-13 07:33:14 -07:00
committed by GitHub
parent c7da145c92
commit 86e0c6963f
3 changed files with 114 additions and 1 deletions

View File

@@ -49,6 +49,69 @@ export namespace SecurityTokenRequest {
}
// ------------------------------- </ Security Token Request > ------------------------------------------
// ------------------------------- < Refresh Token Notification > ---------------------------------
/**
* Parameters for a refresh token notification sent from STS to ADS
*/
export interface RefreshTokenParams {
/**
* The tenant ID
*/
tenantId: string;
/**
* The provider that indicates the type of linked account to query
*/
provider: string;
/**
* The identifier of the target resource of the requested token
*/
resource: string;
/**
* The account ID
*/
accountId: string;
/**
* The URI for the editor that needs a token refresh
*/
uri: string;
}
export namespace RefreshTokenNotification {
export const type = new NotificationType<RefreshTokenParams, void>('account/refreshToken');
}
// ------------------------------- </ Refresh Token Notification > -------------------------------
// ------------------------------- < Token Refreshed Notification > ---------------------------------
/**
* Parameters for a new refresh token sent from ADS to STS
*/
export interface TokenRefreshedParams {
/**
* The refresh token
*/
token: string;
/**
* The token expiration, a Unix epoch
*/
expiresOn: Number;
/**
* The URI for the editor that needs a token refresh
*/
uri: string;
}
export namespace TokenRefreshedNotification {
export const type = new NotificationType<TokenRefreshedParams, void>('account/tokenRefreshed');
}
// ------------------------------- </ Token Refreshed Notification > -------------------------------
// ------------------------------- < Agent Management > ------------------------------------
// Job management parameters
export interface AgentJobsParams {