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 (22 loc) · 816 Bytes
/
Copy pathauthentication.ts
File metadata and controls
27 lines (22 loc) · 816 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.
*--------------------------------------------------------------------------------------------*/
import * as vscode from 'vscode';
export enum GitHubServerType {
None,
GitHubDotCom,
Enterprise
}
export enum AuthProvider {
github = 'github',
githubEnterprise = 'github-enterprise'
}
export class AuthenticationError extends Error {
constructor() {
super(vscode.l10n.t('Not authenticated'));
}
}
export function isSamlError(e: { message?: string }): boolean {
return !!e.message?.includes('Resource protected by organization SAML enforcement.');
}