Akos Kitta 192aac5a81 chore: updated to Theia 1.37.0
- Updated `@theia/*` to `1.37.0`.
 - Fixed all `yarn audit` security vulnerabilities.
 - Updated to `electron@23.2.4`:
   - `contextIsolation` is `true`,
   - `nodeIntegration` is `false`, and the
   - `webpack` target is moved from `electron-renderer` to `web`.
 - Updated to `typescript@4.9.3`.
 - Updated the `eslint` plugins.
 - Added the new `Light High Contrast` theme to the IDE2.
 - High contrast themes use Theia APIs for style adjustments.
 - Support for ESM modules: `"moduleResolution": "node16"`.
 - Node.js >= 16.14 is required.
 - VISX langage packs were bumped to `1.70.0`.
 - Removed undesired editor context menu items. (Closes #1394)

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
2023-05-09 17:37:24 +02:00

42 lines
1.3 KiB
TypeScript

import { JsonRpcServer } from '@theia/core/lib/common/messaging/proxy-factory';
export const authServerPort = 9876;
export interface AuthOptions {
redirectUri: string;
responseType: string;
clientID: string;
domain: string;
audience: string;
registerUri: string;
scopes: string[];
}
export interface AuthenticationSession {
readonly id: string;
readonly accessToken: string;
readonly account: AuthenticationSessionAccountInformation;
readonly scopes: ReadonlyArray<string>;
}
export interface AuthenticationSessionAccountInformation {
readonly id: string;
readonly email: string;
readonly label: string;
readonly picture: string;
}
export const AuthenticationServicePath = '/services/authentication-service';
export const AuthenticationService = Symbol('AuthenticationService');
export interface AuthenticationService
extends JsonRpcServer<AuthenticationServiceClient> {
login(): Promise<AuthenticationSession>;
logout(): Promise<void>;
session(): Promise<AuthenticationSession | undefined>;
disposeClient(client: AuthenticationServiceClient): void;
setOptions(authOptions: AuthOptions): Promise<void>;
initAuthSession(): Promise<void>;
}
export interface AuthenticationServiceClient {
notifySessionDidChange(session?: AuthenticationSession | undefined): void;
}