forked from microsoft/vscode-pull-request-github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauthentication.ts
More file actions
27 lines (23 loc) · 813 Bytes
/
Copy pathauthentication.ts
File metadata and controls
27 lines (23 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export enum GitHubServerType {
None,
GitHubDotCom,
Enterprise
}
export enum AuthProvider {
github = 'github',
'github-enterprise' = 'github-enterprise'
}
export class AuthenticationError extends Error {
name: string;
stack?: string;
constructor(public message: string) {
super(message);
}
}
export function isSamlError(e: { message?: string }): boolean {
return !!e.message?.startsWith('Resource protected by organization SAML enforcement.');
}